diff options
author | Ed Santiago <santiago@redhat.com> | 2021-11-23 07:33:35 -0700 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2021-11-23 15:39:04 -0700 |
commit | eb3708a5243378a659ca126b5d5c457b182d16a8 (patch) | |
tree | 60b55542ad9db7510a782712d2ef0b36cdf82f28 /test/e2e/inspect_test.go | |
parent | c034147fe72a233b8c1ef33d00e9d0747053c262 (diff) | |
download | podman-eb3708a5243378a659ca126b5d5c457b182d16a8.tar.gz podman-eb3708a5243378a659ca126b5d5c457b182d16a8.tar.bz2 podman-eb3708a5243378a659ca126b5d5c457b182d16a8.zip |
Find and fix empty Expect()s
That previous commit made me wonder if there are any other
instances of Expect() with no assertions.
grep Expect test/e2e/*_test.go |egrep -v '\.(To|NotTo|Should)'
...finds a couple of handfuls, most of which are OK (continued
on the next line) but a few of which are bugs. Fix those.
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/e2e/inspect_test.go')
-rw-r--r-- | test/e2e/inspect_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go index 63a54a5ca..52726015c 100644 --- a/test/e2e/inspect_test.go +++ b/test/e2e/inspect_test.go @@ -2,7 +2,6 @@ package integration import ( "os" - "strings" . "github.com/containers/podman/v3/test/utils" . "github.com/onsi/ginkgo" @@ -61,7 +60,7 @@ var _ = Describe("Podman inspect", func() { Expect(inspect).Should(Exit(0)) // output should not be empty // test validates fix for https://github.com/containers/podman/issues/8785 - Expect(strings.Contains(inspect.OutputToString(), "TEST")) + Expect(inspect.OutputToString()).To(ContainSubstring("TEST="), ".Config.Env") session = podmanTest.Podman([]string{"rmi", "envwithtab"}) session.WaitWithDefaultTimeout() @@ -76,7 +75,7 @@ var _ = Describe("Podman inspect", func() { result := podmanTest.Podman([]string{"images", "-q", "--no-trunc", ALPINE}) result.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - Expect(strings.Contains(result.OutputToString(), session.OutputToString())) + Expect(result.OutputToStringArray()).To(ContainElement("sha256:"+session.OutputToString()), "'podman images -q --no-truncate' includes 'podman inspect --format .ID'") }) It("podman inspect specified type", func() { |