Add BYOK test - #36
Merged
Merged
Conversation
Reviewer's GuideThis PR refactors the existing common installation test to leverage shared utility functions and constants, extends the end-to-end utility library with exponential backoff deletion, image preparation, and RHTAS-specific TUF parsing, and introduces a new BYOK-focused test suite complete with custom resource templates, while updating dependencies and documentation accordingly. ER diagram for new BYOK custom resourceserDiagram
POLICY_CONTROLLER ||--o{ CLUSTER_IMAGE_POLICY : applies
TRUST_ROOT ||--o{ POLICY_CONTROLLER : trusted_by
CLUSTER_IMAGE_POLICY {
string name
string rules
}
POLICY_CONTROLLER {
string name
string config
}
TRUST_ROOT {
string name
string rootData
}
Class diagram for new and refactored E2E test utilitiesclassDiagram
class CommonInstallTest {
}
class BYOKInstallTest {
}
class ImageUtil {
+PrepareTestImage()
}
class RHTASUtil {
+ParseTUF()
+ExponentialBackoffDelete()
}
class KubernetesUtil {
}
class CosignUtil {
}
CommonInstallTest --|> ImageUtil : uses
CommonInstallTest --|> RHTASUtil : uses
BYOKInstallTest --|> ImageUtil : uses
BYOKInstallTest --|> RHTASUtil : uses
BYOKInstallTest --|> KubernetesUtil : uses
BYOKInstallTest --|> CosignUtil : uses
Class diagram for new BYOK test suite and custom resourcesclassDiagram
class BYOKInstallTest {
+TestBYOKInstallation()
+TestBYOKPolicyEnforcement()
}
class ClusterImagePolicyTemplate {
}
class PolicyControllerTemplate {
}
class TrustRootTemplate {
}
BYOKInstallTest --|> ClusterImagePolicyTemplate : uses
BYOKInstallTest --|> PolicyControllerTemplate : uses
BYOKInstallTest --|> TrustRootTemplate : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @JasonPowr - I've reviewed your changes - here's some feedback:
- Extract shared setup and assertion logic between common_install_test.go and byok_install_test.go into reusable helper functions to reduce duplication.
- Consider separating the new TUF/CA utilities (rhtas.go) and image preparation code (image.go) into dedicated subpackages for clearer organization.
- DeleteResource only retries the GET after deletion—consider applying the same exponential‐backoff retry to the initial Delete call to handle transient errors.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Extract shared setup and assertion logic between common_install_test.go and byok_install_test.go into reusable helper functions to reduce duplication.
- Consider separating the new TUF/CA utilities (rhtas.go) and image preparation code (image.go) into dedicated subpackages for clearer organization.
- DeleteResource only retries the GET after deletion—consider applying the same exponential‐backoff retry to the initial Delete call to handle transient errors.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Member
Author
|
/retest |
osmman
self-requested a review
July 16, 2025 11:53
osmman
approved these changes
Jul 16, 2025
Contributor
|
LGTM |
This was referenced Aug 4, 2026
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.
Summary by Sourcery
Add BYOK end-to-end tests and refactor common installation tests with new utilities for dynamic image preparation, TUF root management, templating improvements, and enhanced cleanup.
New Features:
Enhancements:
Build:
Documentation: