Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitstamp/Kraken: Enhance test coverage #1423

Merged

Conversation

Beadko
Copy link
Contributor

@Beadko Beadko commented Dec 15, 2023

PR Description

Fix Bitstamp tests that are failing, improve the test coverage

Fixes # (issue)

Type of change

Please delete options that are not relevant and add an x in [] as item is complete.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and
also consider improving test coverage whilst working on a certain feature or package.

  • go test ./... -race
  • golangci-lint run
  • Bitstamp_tests

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation and regenerated documentation via the documentation tool
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally and on Github Actions/AppVeyor with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link
Collaborator

@shazbert shazbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update @Beadko 🚀! A linter issue is present as well.

exchanges/kraken/kraken_test.go Outdated Show resolved Hide resolved
exchanges/bitstamp/bitstamp_wrapper.go Outdated Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
@shazbert shazbert added review me This pull request is ready for review reconstructing Based on PR feedback, this is currently being reworked and is not to be merged labels Dec 18, 2023
@Beadko Beadko force-pushed the bugfix/bitstamp_fix_failing_tests branch from ae7f069 to 0c40ad7 Compare December 19, 2023 09:04
@Beadko Beadko requested a review from shazbert December 19, 2023 09:11
@shazbert shazbert removed the reconstructing Based on PR feedback, this is currently being reworked and is not to be merged label Dec 21, 2023
Copy link
Collaborator

@shazbert shazbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes; One pending item left. Looks good!

Also; you do have the option to merge master and not go through the pain of re-applying commits on top of it in a rebase. It's also easier for me to review the steps that occur. But if this is what you like do and you are used to doing it this way, then keep doing it.

exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
@Beadko Beadko requested a review from shazbert December 26, 2023 05:49
@shazbert shazbert added the test(s) fix This is to denote the PR is fixing a build test issue label Dec 27, 2023
Copy link
Collaborator

@shazbert shazbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes ACK.

@shazbert shazbert added the szrc shazbert review complete label Dec 27, 2023
@thrasher- thrasher- changed the title Bugfix/bitstamp fix failing tests Bitstamp: Enhance test coverage Dec 29, 2023
@shazbert
Copy link
Collaborator

shazbert commented Jan 2, 2024

@Beadko Merge required.

@shazbert shazbert removed the szrc shazbert review complete label Jan 2, 2024
Copy link
Collaborator

@gloriousCode gloriousCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you merge/rebase master branch, should be good! Thanks!

exchanges/bitstamp/bitstamp_test.go Show resolved Hide resolved
@Beadko Beadko force-pushed the bugfix/bitstamp_fix_failing_tests branch from 67dab95 to 2c36d82 Compare January 16, 2024 07:13
Copy link

codecov bot commented Jan 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e16ee53) 43.83% compared to head (6d65200) 43.91%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1423      +/-   ##
==========================================
+ Coverage   43.83%   43.91%   +0.08%     
==========================================
  Files         363      363              
  Lines      143963   143963              
==========================================
+ Hits        63107    63228     +121     
+ Misses      73270    73131     -139     
- Partials     7586     7604      +18     

see 12 files with indirect coverage changes

@Beadko Beadko requested a review from gloriousCode January 16, 2024 07:23
Copy link
Collaborator

@thrasher- thrasher- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Beadko for enhancing the test coverage! Some nitterinos found

exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
exchanges/bitstamp/bitstamp_test.go Show resolved Hide resolved
@Beadko Beadko force-pushed the bugfix/bitstamp_fix_failing_tests branch from f6a9733 to eb3ba2d Compare January 17, 2024 14:10
@Beadko Beadko requested a review from thrasher- January 17, 2024 14:11
Copy link
Collaborator

@thrasher- thrasher- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making those changes!

Copy link
Collaborator

@gloriousCode gloriousCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, I received a panic testing this. After addressing it locally, there still appears to be test issues running the entire package's tests (ie from ./exchanges/bitstamp running go test -race

exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
@Beadko Beadko requested a review from gloriousCode January 22, 2024 13:28
Copy link
Collaborator

@gloriousCode gloriousCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK! Thanks Beadko for making those changes!

Copy link
Collaborator

@thrasher- thrasher- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be the final batch of nits and then this looks good to merge! Nice stuff

exchanges/bitstamp/bitstamp_test.go Outdated Show resolved Hide resolved
assert.Positive(t, req.High, "High should be positive")
assert.Positive(t, req.Low, "Low should be positive")
assert.Positive(t, req.Close, "Close should be positive")
assert.Positive(t, req.Open, "Low should be positive")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this one still remains

}
}

func TestBitstamp_GetHistoricCandlesExtended(t *testing.T) {
pair, err := currency.NewPairFromString("BTCUSD")
if err != nil {
t.Fatal(err)
t.Error("Invalid pair")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if this is something you were interested to do in this PR or not

@Beadko Beadko requested a review from thrasher- January 24, 2024 08:29
@Beadko Beadko force-pushed the bugfix/bitstamp_fix_failing_tests branch from 5462aa6 to 6d65200 Compare February 2, 2024 06:56
@Beadko Beadko requested a review from thrasher- February 3, 2024 06:28
Copy link
Collaborator

@thrasher- thrasher- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Beadko , looking good!

@gloriousCode gloriousCode self-requested a review February 4, 2024 22:48
Copy link
Collaborator

@gloriousCode gloriousCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reTACK

@thrasher- thrasher- changed the title Bitstamp: Enhance test coverage Bitstamp/Kraken: Enhance test coverage Feb 4, 2024
Copy link
Collaborator

@shazbert shazbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reTACK

@thrasher- thrasher- merged commit e0c6e11 into thrasher-corp:master Feb 4, 2024
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review me This pull request is ready for review test(s) fix This is to denote the PR is fixing a build test issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants