fix(e2e): clear policy exclusions to avoid serialization errors#478
Merged
fix(e2e): clear policy exclusions to avoid serialization errors#478
Conversation
The ImageScanningTestNoFileTest overrode getJobConfig but was missing the readTimeoutSeconds parameter. This caused the timeout test to call the parent method instead, making it use createJobConfig() rather than createJobConfigNoFile(), which resulted in test failure. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The timeout test is environment-dependent and fragile because it relies on external infrastructure being slow enough to trigger a timeout with a 1-second limit. This makes it unreliable in CI environments with varying network speeds and API response times. The readTimeoutSeconds parameter support remains in place as it's still a useful configuration option for the Jenkins plugin. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
When retrieving a policy from the API and updating it, the exclusions may contain null scope values that cause Gson serialization errors: "Not a JSON Object: null" at StorageScope serialization. This fix clears the exclusions array before updating the policy to avoid the serialization issue while still allowing the tests to modify enforcement actions and policy fields. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Tomasz Janiszewski <tomek@redhat.com>
e4a0408 to
afa58af
Compare
rhybrillou
approved these changes
Mar 13, 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.
When retrieving a policy from the API and updating it, the exclusions may contain null scope values that cause Gson serialization errors: "Not a JSON Object: null" at StorageScope serialization.
This fix clears the exclusions array before updating the policy to avoid the serialization issue while still allowing the tests to modify enforcement actions and policy fields.
Also remove flaky timeout test as it's failing randomly when scan is faster then the timeout.