-
Notifications
You must be signed in to change notification settings - Fork 28
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
missing e2e tag in many itest files #415
Comments
Only files that contain test cases need the |
@SebastianElvis not exactly. we also followed the current structure initially to just add the tag in however, CI failed complaining about these two vars not used:
digging deeper, it's b/c in the Makefil so when linting, it won't see the test file and see those two vars not used. I think this implies two things:
so I did two things to fix it:
cc @maurolacy this also explained you other question in #418 (review) |
hmm i see, ideally shouldn't we also lint the files which have build tags? I see there are 2 problems
Solution
wdyt? |
@gusin13 yes we should but there are some problems in existing files and that's why I didn't try to fix them in my PRs. if you try to add the build tags in the lint command, you will see some errors. It's not breaking anything because the CI currently ignores all of them. |
solution 2 probably won't work because for files (e.g. test manager) that don't have such tags will fail the normal linting process without tags because it won't know which other files use the methods and variables defined in them. i.e. the unused var situation I described above I think solution 1 is the proper fix but it could be a non-trivial change i.e. currently there r some test-only function defined in those consumer files, if we suddenly add the tag to all test files, those functions might be considered unused so we will need to move them to test files |
to continue the conversation from #423 (comment)
this seems to work b/c it ignores all op tests. the reason to have
that's not the case anymore because I added https://github.com/babylonchain/finality-provider/blob/base/consumer-chain-support/.golangci.yml |
interesting, you are right op tests are being ignored somehow wondering why doesn't this problem occur in
if i run above the bcd tests run fine.
|
It doesn't occur in
b/c only if you try to add the tag in all the files in so the right way is to create |
it won't b/c
so adding this implies we need to use |
is missing in many files inside
itest/
for example,
itest/consumer_e2e_test.go
has the tag butitest/consumer_test_manager.go
doesn't have itthis can confuse lint
#414 is related and I suggest to fix the two issues together
The text was updated successfully, but these errors were encountered: