-
Notifications
You must be signed in to change notification settings - Fork 471
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
Tests: Add start anchor to paralleltest exclusion regex #5046
Tests: Add start anchor to paralleltest exclusion regex #5046
Conversation
I think fix is in the original spirit of the regex. |
Codecov Report
@@ Coverage Diff @@
## master #5046 +/- ##
==========================================
- Coverage 53.56% 53.56% -0.01%
==========================================
Files 430 430
Lines 54092 54092
==========================================
- Hits 28974 28973 -1
- Misses 22874 22877 +3
+ Partials 2244 2242 -2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
See #5046 for info on why these were not caught
New tests that are now within the linter's scope for evaluation: agreement/agreementtest/simulate_test.go |
Summary
This PR adds a start anchor to the paralleltest exclusion regex within golang CI's configuration file. This fixes incorrect behavior that excluded test files that match package names in subdirectories, such as
network_test.go
within thenetdeploy
package.Paralleltest exclusion regex currently follows a pattern similar to
network.*_test\.go
to exclude package directories, but this meant thatnetwork_test.go
was excluded because it began withnetwork
. Adding^
to the start of the regex fixed this issue.Test Plan
I discovered this behavior while reviewing #4993. I confirmed locally that
make lint 2>/dev/null | grep "paralleltest"
had no output before these changes and that it now correctly identifies missing parallel flags withinnetdeploy/network_test.go
.