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

fix failing & add test coverage reporting #36

Merged
merged 3 commits into from
Sep 21, 2023
Merged

fix failing & add test coverage reporting #36

merged 3 commits into from
Sep 21, 2023

Conversation

pirtleshell
Copy link
Member

Getting acquainted with the codebase to start working on node sharding, I noticed some tests that weren't covered by make test because the test methods don't begin with TestUnitTest.

  • update those test names
  • fix test failures in those tests
  • updated make test to run all tests, even if they aren't prefixed with TestUnitTest or TestE2ETest
  • added code coverage reporting for giggles

@pirtleshell pirtleshell requested a review from galxy25 September 21, 2023 19:20
Comment on lines -22 to -26
requestBlockNumber, valid := cosmosmath.NewIntFromString(requestedBlockNumberHexEncoding)

if !valid {
t.Fatalf("failed to convert %s to cosmos sdk int", requestedBlockNumberHexEncoding)
}
Copy link
Member Author

@pirtleshell pirtleshell Sep 21, 2023

Choose a reason for hiding this comment

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

@galxy25, let me know if this deleted code was an important condition of this test.
AFAICT, it is not.

the sdkmath parsing resulted in a test failure:

=== RUN   TestUnitTestExtractBlockNumberFromEVMRPCRequestReturnsExpectedBlockForValidRequest
    evm_rpc_test.go:39: 
                Error Trace:    /Users/pirtle/projects/kava/kava-proxy-service/decode/evm_rpc_test.go:39
                Error:          Not equal: 
                                expected: math.Int(math.Int{i:(*big.Int)(0xc00017d780)})
                                actual  : int64(2)
                Test:           TestUnitTestExtractBlockNumberFromEVMRPCRequestReturnsExpectedBlockForValidRequest

NewIntFromString("0x2") is 824635283328

Copy link
Contributor

@galxy25 galxy25 left a comment

Choose a reason for hiding this comment

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

welcome abroad 🏴‍☠️

@pirtleshell pirtleshell merged commit 3ce72dd into main Sep 21, 2023
4 checks passed
@pirtleshell pirtleshell deleted the rp-fix-tests branch September 21, 2023 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants