diff options
author | Miloslav Trmač <mitr@redhat.com> | 2022-08-24 22:56:54 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2022-08-25 01:51:58 +0200 |
commit | 4df1e2524b9a8b3ff2d3768ac7fe54e98a966886 (patch) | |
tree | 4a6ecf081805b37e4cbda78f492268da0527e822 /pkg/trust/testdata | |
parent | 4b2bd1036b4952a35a526202c8965cd3b32162ad (diff) | |
download | podman-4df1e2524b9a8b3ff2d3768ac7fe54e98a966886.tar.gz podman-4df1e2524b9a8b3ff2d3768ac7fe54e98a966886.tar.bz2 podman-4df1e2524b9a8b3ff2d3768ac7fe54e98a966886.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 |