tests: Use $RELATED_IMAGE_*#263
Merged
Jakob-Naucke merged 1 commit intoMay 27, 2026
Merged
Conversation
Allow tests to not follow the $REGISTRY/$IMAGE_NAME:$TAG format by introducing the $OPERATOR_IMAGE variable and using $RELATED_IMAGE for compute-pcrs etc., like operator does, when set. Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
Reviewer's GuideThis PR refactors how container images are configured for the operator and tests by introducing shared RELATED_IMAGE constants, allowing tests to use explicit OPERATOR_IMAGE and RELATED_IMAGE_* variables instead of strictly deriving images from REGISTRY/IMAGE_NAME:TAG, and aligning env var usage between operator and tests. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider adding an
OPERATOR_IMAGEconstant tolib::images(similar to theRELATED_IMAGE_*ones) and using it in the tests instead of the hard-coded string to keep all image-related env var names centralized. - You may want to reuse the existing
get_image_or_envhelper in the test harness (or a small wrapper around it) so that image selection logic is consistent between the operator and tests and future changes only need to happen in one place.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider adding an `OPERATOR_IMAGE` constant to `lib::images` (similar to the `RELATED_IMAGE_*` ones) and using it in the tests instead of the hard-coded string to keep all image-related env var names centralized.
- You may want to reuse the existing `get_image_or_env` helper in the test harness (or a small wrapper around it) so that image selection logic is consistent between the operator and tests and future changes only need to happen in one place.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
alicefr
approved these changes
May 27, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alicefr, Jakob-Naucke The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
d832576
into
trusted-execution-clusters:main
10 checks passed
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.
Allow tests to not follow the $REGISTRY/$IMAGE_NAME:$TAG format by introducing the $OPERATOR_IMAGE variable and using $RELATED_IMAGE for compute-pcrs etc., like operator does, when set.
Summary by Sourcery
Allow tests and operator code to use shared image environment variable constants and support overriding test images via OPERATOR_IMAGE and RELATED_IMAGE_* variables.
New Features:
Enhancements: