diff options
Diffstat (limited to 'test/e2e/load_test.go')
-rw-r--r-- | test/e2e/load_test.go | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go index a3ee1814a..030e9f80b 100644 --- a/test/e2e/load_test.go +++ b/test/e2e/load_test.go @@ -104,7 +104,15 @@ var _ = Describe("Podman load", func() { result := podmanTest.Podman([]string{"load", "--signature-policy", "/etc/containers/policy.json", "-i", outfile}) result.WaitWithDefaultTimeout() - Expect(result).Should(Exit(0)) + if IsRemote() { + Expect(result).To(ExitWithError()) + Expect(result.ErrorToString()).To(ContainSubstring("unknown flag")) + result = podmanTest.Podman([]string{"load", "-i", outfile}) + result.WaitWithDefaultTimeout() + Expect(result).Should(Exit(0)) + } else { + Expect(result).Should(Exit(0)) + } }) It("podman load with quiet flag", func() { @@ -214,7 +222,7 @@ var _ = Describe("Podman load", func() { result := podmanTest.Podman([]string{"images", "hello:world"}) result.WaitWithDefaultTimeout() Expect(result.LineInOutputContains("docker")).To(Not(BeTrue())) - Expect(result.LineInOutputContains("localhost")).To(BeTrue()) + Expect(result.OutputToString()).To(ContainSubstring("localhost")) }) It("podman load localhost registry from scratch and :latest", func() { @@ -239,7 +247,7 @@ var _ = Describe("Podman load", func() { result := podmanTest.Podman([]string{"images", "hello:latest"}) result.WaitWithDefaultTimeout() Expect(result.LineInOutputContains("docker")).To(Not(BeTrue())) - Expect(result.LineInOutputContains("localhost")).To(BeTrue()) + Expect(result.OutputToString()).To(ContainSubstring("localhost")) }) It("podman load localhost registry from dir", func() { @@ -265,7 +273,7 @@ var _ = Describe("Podman load", func() { result := podmanTest.Podman([]string{"images", "load:latest"}) result.WaitWithDefaultTimeout() Expect(result.LineInOutputContains("docker")).To(Not(BeTrue())) - Expect(result.LineInOutputContains("localhost")).To(BeTrue()) + Expect(result.OutputToString()).To(ContainSubstring("localhost")) }) It("podman load xz compressed image", func() { @@ -290,7 +298,7 @@ var _ = Describe("Podman load", func() { result := podmanTest.Podman([]string{"load", "-i", "./testdata/docker-two-images.tar.xz"}) result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) - Expect(result.LineInOutputContains("example.com/empty:latest")).To(BeTrue()) - Expect(result.LineInOutputContains("example.com/empty/but:different")).To(BeTrue()) + Expect(result.OutputToString()).To(ContainSubstring("example.com/empty:latest")) + Expect(result.OutputToString()).To(ContainSubstring("example.com/empty/but:different")) }) }) |