summaryrefslogtreecommitdiff
path: root/pkg/trust/policy_test.go
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2022-08-25 01:02:13 +0200
committerMiloslav Trmač <mitr@redhat.com>2022-08-25 01:52:59 +0200
commita7e88c8dacd56d266173d3fa04c66eb1a964b332 (patch)
treec75ced2907e425fe1b7b80ead9eb5004099b9580 /pkg/trust/policy_test.go
parent752eceaecc979627e998bee2dba8ee9ce47aa5cf (diff)
downloadpodman-a7e88c8dacd56d266173d3fa04c66eb1a964b332.tar.gz
podman-a7e88c8dacd56d266173d3fa04c66eb1a964b332.tar.bz2
podman-a7e88c8dacd56d266173d3fa04c66eb1a964b332.zip
Add support for showing keyPaths in (podman image trust show)
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'pkg/trust/policy_test.go')
-rw-r--r--pkg/trust/policy_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/trust/policy_test.go b/pkg/trust/policy_test.go
index c2c2d93be..0f9721722 100644
--- a/pkg/trust/policy_test.go
+++ b/pkg/trust/policy_test.go
@@ -117,6 +117,13 @@ func xNewPRSignedByKeyPath(t *testing.T, keyPath string, signedIdentity signatur
return pr
}
+// xNewPRSignedByKeyPaths is a wrapper for NewPRSignedByKeyPaths which must not fail.
+func xNewPRSignedByKeyPaths(t *testing.T, keyPaths []string, signedIdentity signature.PolicyReferenceMatch) signature.PolicyRequirement {
+ pr, err := signature.NewPRSignedByKeyPaths(signature.SBKeyTypeGPGKeys, keyPaths, signedIdentity)
+ require.NoError(t, err)
+ return pr
+}
+
// xNewPRSigstoreSignedKeyPath is a wrapper for NewPRSigstoreSignedKeyPath which must not fail.
func xNewPRSigstoreSignedKeyPath(t *testing.T, keyPath string, signedIdentity signature.PolicyReferenceMatch) signature.PolicyRequirement {
pr, err := signature.NewPRSigstoreSignedKeyPath(keyPath, signedIdentity)