diff options
Diffstat (limited to 'test/e2e/unshare_test.go')
-rw-r--r-- | test/e2e/unshare_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/e2e/unshare_test.go b/test/e2e/unshare_test.go index 24ab98916..eacdda68a 100644 --- a/test/e2e/unshare_test.go +++ b/test/e2e/unshare_test.go @@ -6,6 +6,7 @@ import ( . "github.com/containers/podman/v3/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + . "github.com/onsi/gomega/gexec" ) var _ = Describe("Podman unshare", func() { @@ -45,7 +46,7 @@ var _ = Describe("Podman unshare", func() { userNS, _ := os.Readlink("/proc/self/ns/user") session := podmanTest.Podman([]string{"unshare", "readlink", "/proc/self/ns/user"}) session.WaitWithDefaultTimeout() - Expect(session.ExitCode()).To(Equal(0)) + Expect(session).Should(Exit(0)) ok, _ := session.GrepString(userNS) Expect(ok).To(BeFalse()) }) @@ -53,7 +54,7 @@ var _ = Describe("Podman unshare", func() { It("podman unshare --rootles-cni", func() { session := podmanTest.Podman([]string{"unshare", "--rootless-cni", "ip", "addr"}) session.WaitWithDefaultTimeout() - Expect(session.ExitCode()).To(Equal(0)) + Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring("tap0")) }) }) |