-
Notifications
You must be signed in to change notification settings - Fork 13
tests: fix assertions in emulator #1043
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes assertions in the emulator's test framework and reorganizes the validation logic for better testing. The changes primarily focus on improving test error messages and exposing justification validation logic for testing.
- Improves assertion error messages in the emulator for better debugging
- Refactors justification validation logic to separate concerns and enable better caching
- Fixes incorrect justification references in test cases
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| merkle/merkle_test.go | Removes t.Parallel() call to fix test execution |
| gpbft/validator.go | Refactors justification validation logic, moves caching logic, and extracts signature validation |
| gpbft/participant_test.go | Updates test names and error message expectations |
| gpbft/gpbft_test.go | Fixes justification references in test cases to use correct values |
| emulator/driver_assertions.go | Enhances assertion error messages and fixes assertion bug |
Comments suppressed due to low confidence (1)
emulator/driver_assertions.go:87
- This line compares justification with itself instead of comparing it with msg.Justification. This was correctly fixed on line 88.
d.require.True(vote.Eq(msg.Vote.Value))
This PR fixes assertions checks in emulator and re-organises the validation logic a bit to facilitate testing. Signed-off-by: Jakub Sztandera <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1043 +/- ##
==========================================
- Coverage 64.91% 64.58% -0.33%
==========================================
Files 80 81 +1
Lines 9733 9894 +161
==========================================
+ Hits 6318 6390 +72
- Misses 2914 2978 +64
- Partials 501 526 +25
🚀 New features to boost your workflow:
|
This PR fixes assertions checks in emulator and re-organises the
validation logic a bit to facilitate testing.