fix(tests): Exclude VM scanning tests from general e2e test target#20746
Merged
Conversation
lvalerom
approved these changes
May 21, 2026
Contributor
🚀 Build Images ReadyImages are ready for commit 9b92acc. To use with deploy scripts: export MAIN_IMAGE_TAG=4.11.x-1102-g9b92accd27 |
Contributor
Author
|
/test ocp-4-21-vm-scanning-e2e-tests |
The test_e2e build tag caused VM scanning tests to compile and run in gke-nongroovy-e2e-tests, which was not intended or planned. Restrict to test_e2e_vm so only the dedicated vm-scanning-tests Makefile target picks them up.
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
38ec455 to
3bebb24
Compare
rhybrillou
approved these changes
May 21, 2026
Contributor
Author
|
/test ocp-4-21-nongroovy-e2e-tests |
Contributor
Author
|
/test ocp-4-21-vm-scanning-e2e-tests |
Contributor
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-4.11 release-4.11
# Navigate to the new working tree
cd .worktrees/backport-release-4.11
# Create a new branch
git switch --create backport-20746-to-release-4.11
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9b92accd2782a9fa4f35c86f2ba297aa20997d88
# Push it to GitHub
git push --set-upstream origin backport-20746-to-release-4.11
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-4.11Then, create a pull request where the |
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.
Description
VM scanning tests had a
//go:build test_e2e || test_e2e_vmconstraint, which caused them to compile and execute under the generaltest_e2etag used bygke-nongroovy-e2e-tests. That was not intended or planned.Changed the build constraint on all 6 VM-scanning-specific test files to
//go:build test_e2e_vm, so they are only compiled and run by the dedicatedmake vm-scanning-teststarget.Shared files (
common.go,common_test.go,common_matchers.go) were left unchanged - they use a broader multi-tag constraint and serve non-VM tests.User-facing documentation
Testing and quality
Automated testing
How I validated my change
Ran nongroovy tests in CI and made sure that no VM-related tests are executed:
github.com/stackrox/rox/tests/vmhelpers: TestPlaceholderwhich is a unit test that covers the helpers of the vm e2e tests. Currently, there is only a placeholder, but more will be added in ROX-29577: Add VM scanning scan and rescan pipeline validation #20128, ROX-29577: Add VM scanning pipeline metrics assertions #20129, and ROX-29577: Preflight vmhelper unit tests #20402Ergo: only the unit-test
github.com/stackrox/rox/tests/vmhelpers: TestPlaceholder(duration 0s) is executed in both targets. I will tackle that issue and make it run only once in a followup (provided the green CI).