tests: fix expect tests and add EOF linter#6122
Merged
algorandskiy merged 9 commits intoalgorand:masterfrom Sep 5, 2024
Merged
tests: fix expect tests and add EOF linter#6122algorandskiy merged 9 commits intoalgorand:masterfrom
algorandskiy merged 9 commits intoalgorand:masterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6122 +/- ##
==========================================
- Coverage 56.22% 56.20% -0.03%
==========================================
Files 494 494
Lines 69921 69921
==========================================
- Hits 39313 39299 -14
- Misses 27941 27954 +13
- Partials 2667 2668 +1 ☔ View full report in Codecov by Sentry. |
gmalouf
previously approved these changes
Sep 4, 2024
cce
reviewed
Sep 4, 2024
algorandskiy
commented
Sep 4, 2024
Contributor
Author
algorandskiy
left a comment
There was a problem hiding this comment.
some eofs looks exceeding because of variables checking after the expect statement but does not hurt
algorandskiy
commented
Sep 4, 2024
algorandskiy
commented
Sep 5, 2024
cce
approved these changes
Sep 5, 2024
gmalouf
reviewed
Sep 5, 2024
Contributor
gmalouf
left a comment
There was a problem hiding this comment.
Added 1 ask in Makefile - is the idea that eof wasn't being called in some corner cases/we ended up with false positives?
gmalouf
approved these changes
Sep 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
While looking why #6089 expect test did not work as expected, I found it copied the
expectstatement from theCheckNetworkAddressForCorsfunction, and it does not perform check correctly ignoring the fact of missing expected output.I fixed that by added
eofsub statement which is hit when no other statement executed previously and when there is noexp_continue. After that the test started failing since it was checking KMD headers without settingallowed_originsconfiguration option.@cce also discovered the same issue in some other tests and added a linter.
Test Plan
This is a test fix.