-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix Podman image trust
tests
#12060
Fix Podman image trust
tests
#12060
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mtrmac The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
85067d0
to
8b6b4fb
Compare
The |
Should not change behavior, just to set a consistent precedent for code introduced in future commits. Signed-off-by: Miloslav Trmač <[email protected]>
... to include all fields. Signed-off-by: Miloslav Trmač <[email protected]>
Instead using the OS-wide system default policy, use the one in this repo, and adjust the expected results (as well as making the test stricter). Signed-off-by: Miloslav Trmač <[email protected]>
8b6b4fb
to
adee084
Compare
Rebased on top of |
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.
FWIW some surprising, probably unwanted, behavior I have noticed.
}) | ||
|
||
It("podman image trust show --raw", func() { | ||
session := podmanTest.Podman([]string{"image", "trust", "show", "--raw"}) | ||
session := podmanTest.Podman([]string{"image", "trust", "show", "--policypath", filepath.Join(INTEGRATION_ROOT, "test/policy.json"), "--raw"}) |
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.
podman image trust show $path/test.policy.json --raw
(missing the --policypath
option, i.e. with an extra argument) does not fail.
"name": "docker.io/library/hello-world", | ||
"repo_name": "docker.io/library/hello-world", | ||
"sigstore": "", | ||
"transport": "", |
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.
Note that transport
is always empty.
LGTM |
@mtrmac would you mind fixing up the PR description...I think this should get rebased against main and merged in (assuming code-ready). Edit: Nevermind, you already rebased, I needed to refresh the page. |
/lgtm |
/hold cancel |
What this PR does / why we need it:
Fix
podman image trust
not to assume a specific system-wide configuration, and make the tests a bit stricter. Relevant for #11795 .How to verify it
podman image trust
tests succeed both on F35 (which has changed the system-widepolicy.json
) and in all other environments.Which issue(s) this PR fixes:
None
Special notes for your reviewer:
See #11795 (comment) for more discussion.