-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use .statement.predicate everywhere instead of just .predicate #772
Conversation
d6f3546
to
c1e3c8d
Compare
Codecov Report
@@ Coverage Diff @@
## main #772 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 86 84 -2
Lines 3342 3318 -24
=========================================
- Hits 3342 3318 -24
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't realized this is only in the tests, 👍
More work needs to be done. See |
f77dd06
to
3daa0ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 based on Luiz's comment
Edit: I see there are some revisions since then, disregard.
46d6e5e
to
404dd61
Compare
The test that is failing appears to be a bad test which has been exposed! This makes it pass: diff --git a/policy/release/step_image_registries_test.rego b/policy/release/step_image_registries_test.rego
index 73b88a0..627ff6f 100644
--- a/policy/release/step_image_registries_test.rego
+++ b/policy/release/step_image_registries_test.rego
@@ -66,7 +66,7 @@ test_unexpected_image_ref if {
lib.assert_equal_results(step_image_registries.deny, {{
"code": "step_image_registries.task_step_images_permitted",
"msg": sprintf("Step 0 in task 'mytask' has disallowed image ref '%s'", [unexpected_image]),
- }}) with input.attestations as mock_data(unexpected_image)
+ }}) with input.attestations as [mock_data(unexpected_image)]
}
test_step_image_registry_prefix_list_found if { |
bbcfb7b
to
6428ba3
Compare
@lcarva I thought that might have been it! I tried that fix in the library function, but that still broke things. Didn't think to do it in the test itself. Thanks! Tests do indeed pass now! 🎉 |
019bc08
to
dae3b97
Compare
Signed-off-by: Mark Bestavros <mbestavr@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Let's get this in!
Resolves #756.