-
Notifications
You must be signed in to change notification settings - Fork 486
test: Faster tests by being consistent with what counts as TEST_ACCEPTANCE #2382
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2382 +/- ##
==========================================
- Coverage 67.75% 67.74% -0.02%
==========================================
Files 172 172
Lines 13291 13296 +5
==========================================
+ Hits 9005 9007 +2
- Misses 3581 3582 +1
- Partials 705 707 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
So the idea with I think rather than change that, we should make proper use of |
|
My understanding is that |
|
Huh did not know about the This change actually makes TEST_ACCEPTANCE actually cut out tests that require external dependency (there's a few docker tests that were not behind the flag), I'll do another pass to make sure only tests that require external deps are behind the flag. |
despite what I've said, I actually don't think we should consider Docker as exoitc since I think thats a very common dependency and it would mean all of our image scanning tests get disabled by default. I think if we use
|
|
There's a misunderstanding here, we have two sets of docker tests, one for with the --archive flag, and one without. The one without So leaving them out of test acceptance is no issue, since it's really just testing some very thin convenience code. In this PR I actually enabled image scanning with |
…for shorter tests <5s
|
Ok, made a few more changes: Split up TEST_ACCEPTANCE into two things, TEST_ACCEPTANCE is now purely for tests that require external dependencies (or extreme reqs like high memory) go test -short is now for tests that run under 5s (which is the majority of the tests, including container scanning tests) |
This makes the standard tests (
make test) run under 5s by making the following changes:Moved all of the following tests to be skipped if -short is passed
Offline database tests
Java archive reachability tests (does dep resolution)
Transitive dependency tests
Moved all docker dependency tests under TEST_ACCEPTANCE=true
Some tests have both TEST_ACCEPTANCE=true and SkipIfShort, this allows for short tests while TEST_ACCEPTANCE=true
This also includes some additional minor changes to aid with debugging and testing.