aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2021-10-21 22:19:23 +0200
committerMiloslav Trmač <mitr@redhat.com>2021-10-25 18:02:41 +0200
commit53ff49237be3bba5ba445990ab517f9d45d737c4 (patch)
treee194aed10e74bf33252f67eab5bd80b28068bfe8 /test
parentc872788e4ed230ceb081df3605497f22c8df270a (diff)
downloadpodman-53ff49237be3bba5ba445990ab517f9d45d737c4.tar.gz
podman-53ff49237be3bba5ba445990ab517f9d45d737c4.tar.bz2
podman-53ff49237be3bba5ba445990ab517f9d45d737c4.zip
Tighten the expected output of the "podman image trust show" test
... to include all fields. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/trust_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/e2e/trust_test.go b/test/e2e/trust_test.go
index 26b58737c..efb00cad5 100644
--- a/test/e2e/trust_test.go
+++ b/test/e2e/trust_test.go
@@ -45,11 +45,11 @@ var _ = Describe("Podman trust", func() {
outArray := session.OutputToStringArray()
Expect(len(outArray)).To(Equal(3))
- // image order is not guaranteed. All we can do is check that
- // these strings appear in output, we can't cross-check them.
- Expect(session.OutputToString()).To(ContainSubstring("accept"))
- Expect(session.OutputToString()).To(ContainSubstring("reject"))
- Expect(session.OutputToString()).To(ContainSubstring("signed"))
+ // Repository order is not guaranteed. So, check that
+ // all expected lines appear in output; we also check total number of lines, so that handles all of them.
+ Expect(string(session.Out.Contents())).To(MatchRegexp(`(?m)^default\s+accept\s*$`))
+ Expect(string(session.Out.Contents())).To(MatchRegexp(`(?m)^docker.io/library/hello-world\s+reject\s*$`))
+ Expect(string(session.Out.Contents())).To(MatchRegexp(`(?m)^registry.access.redhat.com\s+signedBy\s+security@redhat.com, security@redhat.com\s+https://access.redhat.com/webassets/docker/content/sigstore\s*$`))
})
It("podman image trust set", func() {