diff options
author | Miloslav Trmač <mitr@redhat.com> | 2022-08-24 20:28:14 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2022-08-25 01:52:59 +0200 |
commit | 2f6c145e86027da7ecf352331db70f5e688701b6 (patch) | |
tree | 6c68327aac711c4eb478102fd547093c975945b2 /pkg/trust/trust_test.go | |
parent | b15afce551a521b6224cf0a0c5a29beb89556e91 (diff) | |
download | podman-2f6c145e86027da7ecf352331db70f5e688701b6.tar.gz podman-2f6c145e86027da7ecf352331db70f5e688701b6.tar.bz2 podman-2f6c145e86027da7ecf352331db70f5e688701b6.zip |
Use the full descriptionsOfPolicyRequirements for the default scope
... instead of taking a shortcut, e.g. not listing any keys if they are required.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'pkg/trust/trust_test.go')
-rw-r--r-- | pkg/trust/trust_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pkg/trust/trust_test.go b/pkg/trust/trust_test.go index ef2d10061..d04e9f211 100644 --- a/pkg/trust/trust_test.go +++ b/pkg/trust/trust_test.go @@ -79,6 +79,24 @@ func TestPolicyDescription(t *testing.T) { }, }, }, + { + &signature.Policy{ + Default: signature.PolicyRequirements{ + xNewPRSignedByKeyPath(t, "/1.pub", signature.NewPRMMatchRepoDigestOrExact()), + xNewPRSignedByKeyPath(t, "/2,3.pub", signature.NewPRMMatchRepoDigestOrExact()), + }, + }, + []*Policy{ + { + Transport: "all", + Name: "* (default)", + RepoName: "default", + Type: "signed", + SignatureStore: "", + GPGId: "1, 2, 3", + }, + }, + }, } { policyJSON, err := json.Marshal(c.policy) require.NoError(t, err) |