diff options
author | Miloslav Trmač <mitr@redhat.com> | 2022-08-24 22:56:54 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2022-08-29 17:55:38 +0200 |
commit | a304b8d28702b7838533bb111908c1f47b20772d (patch) | |
tree | 73442fd0bf3b4f205c3a6e206f68f3c13dd45bcb /pkg/trust/testdata | |
parent | 721de77c40783c90954ad46c6fd3b1443b770052 (diff) | |
download | podman-a304b8d28702b7838533bb111908c1f47b20772d.tar.gz podman-a304b8d28702b7838533bb111908c1f47b20772d.tar.bz2 podman-a304b8d28702b7838533bb111908c1f47b20772d.zip |
Add a unit test for trust.PolicyDescription
Add at least a basic unit test for the various entry types.
So that we don't have to actually deal with GPG keys and /usr/bin/gpg*,
parametrize the code with a gpgIDReader , and pass a fake one
in the unit test.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'pkg/trust/testdata')
-rw-r--r-- | pkg/trust/testdata/default.yaml | 25 | ||||
-rw-r--r-- | pkg/trust/testdata/redhat.yaml | 3 |
2 files changed, 28 insertions, 0 deletions
diff --git a/pkg/trust/testdata/default.yaml b/pkg/trust/testdata/default.yaml new file mode 100644 index 000000000..31bcd35ef --- /dev/null +++ b/pkg/trust/testdata/default.yaml @@ -0,0 +1,25 @@ +# This is a default registries.d configuration file. You may +# add to this file or create additional files in registries.d/. +# +# lookaside: indicates a location that is read and write +# lookaside-staging: indicates a location that is only for write +# +# lookaside and lookaside-staging take a value of the following: +# lookaside: {schema}://location +# +# For reading signatures, schema may be http, https, or file. +# For writing signatures, schema may only be file. + +# This is the default signature write location for docker registries. +default-docker: +# lookaside: file:///var/lib/containers/sigstore + lookaside-staging: file:///var/lib/containers/sigstore + +# The 'docker' indicator here is the start of the configuration +# for docker registries. +# +# docker: +# +# privateregistry.com: +# lookaside: http://privateregistry.com/sigstore/ +# lookaside-staging: /mnt/nfs/privateregistry/sigstore diff --git a/pkg/trust/testdata/redhat.yaml b/pkg/trust/testdata/redhat.yaml new file mode 100644 index 000000000..35f2c611c --- /dev/null +++ b/pkg/trust/testdata/redhat.yaml @@ -0,0 +1,3 @@ +docker: + registry.redhat.io: + sigstore: https://registry.redhat.io/containers/sigstore |