Skip to content

ROX-32714: Update groovy tests for ImageV2#19972

Draft
charmik-redhat wants to merge 1 commit intomasterfrom
ROX-32714/update-groovy-tests-to-work-with-imagev2
Draft

ROX-32714: Update groovy tests for ImageV2#19972
charmik-redhat wants to merge 1 commit intomasterfrom
ROX-32714/update-groovy-tests-to-work-with-imagev2

Conversation

@charmik-redhat
Copy link
Copy Markdown
Contributor

Description

Update groovy E2E tests under qa-tests-backend/ to work correctly when
FlattenImageData is enabled (ImageV2).

When FlattenImageData is enabled, images are stored in a new images_v2
table and their IDs change from the image digest (SHA) to a deterministic
UUIDv5 derived from the full image name and digest. These changes update
the tests to handle both ID schemes:

  • Add Helpers.generateImageV2ID() and newV5FromNonUUIDs() to mirror the
    Go-side pkg/images/utils.NewImageV2ID UUID generation logic
  • Add flattenImageDataEnabled flag to BaseSpecification (read from
    ROX_FLATTEN_IMAGE_DATA env var) and a pre-computed TEST_IMAGE_V2_ID
  • Update AdmissionControllerTest, ImageManagementTest, and CSVTest to
    use the V2 image ID when the flag is enabled
  • Update VulnMgmtTest to pass image name alongside digest so it can
    compute the correct image ID for GraphQL queries
  • Update SACTest to expect an additional search result (IMAGES_V2 category)
  • Update GlobalSearch to include the IMAGES_V2 search category
  • Add retry logic in UpgradesTest for getImages and GraphQL queries,
    since the reprocessor may take time to migrate images to images_v2
    after an upgrade

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

Ran tests with and without the FlattenImageData enabled

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 13, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.56%. Comparing base (ac171d9) to head (5ed9a17).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19972   +/-   ##
=======================================
  Coverage   49.56%   49.56%           
=======================================
  Files        2764     2764           
  Lines      208442   208442           
=======================================
  Hits       103321   103321           
  Misses      97466    97466           
  Partials     7655     7655           
Flag Coverage Δ
go-unit-tests 49.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

🚀 Build Images Ready

Images are ready for commit 5ed9a17. To use with deploy scripts:

export MAIN_IMAGE_TAG=4.11.x-637-g5ed9a178aa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant