Makefile: Disable test caching by using go test -count=1#97
Merged
anfredette merged 1 commit intobpfman:mainfrom Aug 13, 2024
Merged
Conversation
The test-integration Make target clears the entire Go test cache, which is overly aggressive, especially when running `go test ./...` in other projects, causing all tests to re-run after running the integration tests. Instead, use the idiomatic -count=1 flag to explicitly disable test caching. This idiom is mentioned in the documentation [1]: "The idiomatic way to disable test caching explicitly is to use -count=1." [1] https://pkg.go.dev/cmd/go#hdr-Test_packages Signed-off-by: Andrew McDermott <amcdermo@redhat.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #97 +/- ##
=======================================
Coverage 27.61% 27.61%
=======================================
Files 81 81
Lines 6999 6999
=======================================
Hits 1933 1933
Misses 4877 4877
Partials 189 189
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Billy99
approved these changes
Aug 13, 2024
Contributor
Billy99
left a comment
There was a problem hiding this comment.
/lgtm
I am not familiar with this syntax, but following the provided link, looks like this is the preferred method.
msherif1234
pushed a commit
to msherif1234/bpfman-operator
that referenced
this pull request
Nov 15, 2024
…/ocp-bpfman chore(deps): update ocp-bpfman to 865b993
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.
The test-integration Make target clears the entire Go test cache, which is overly aggressive, especially when running
go test ./...in other projects, causing all tests to re-run in those other projects after running the integration tests.Instead, use the idiomatic -count=1 flag to explicitly disable test caching.
This idiom is mentioned in the documentation [1]: "The idiomatic way to disable test caching explicitly is to use -count=1."
[1] https://pkg.go.dev/cmd/go#hdr-Test_packages