diff options
Diffstat (limited to 'test/e2e/create_staticmac_test.go')
-rw-r--r-- | test/e2e/create_staticmac_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/e2e/create_staticmac_test.go b/test/e2e/create_staticmac_test.go index 1df93553d..7cb638e47 100644 --- a/test/e2e/create_staticmac_test.go +++ b/test/e2e/create_staticmac_test.go @@ -8,6 +8,7 @@ import ( "github.com/containers/storage/pkg/stringid" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + . "github.com/onsi/gomega/gexec" ) var _ = Describe("Podman run with --mac-address flag", func() { @@ -40,9 +41,9 @@ var _ = Describe("Podman run with --mac-address flag", func() { result := podmanTest.Podman([]string{"run", "--mac-address", "92:d0:c6:0a:29:34", ALPINE, "ip", "addr"}) result.WaitWithDefaultTimeout() if rootless.IsRootless() { - Expect(result.ExitCode()).To(Equal(125)) + Expect(result).Should(Exit(125)) } else { - Expect(result.ExitCode()).To(Equal(0)) + Expect(result).Should(Exit(0)) Expect(result.OutputToString()).To(ContainSubstring("92:d0:c6:0a:29:34")) } }) @@ -52,11 +53,11 @@ var _ = Describe("Podman run with --mac-address flag", func() { session := podmanTest.Podman([]string{"network", "create", net}) session.WaitWithDefaultTimeout() defer podmanTest.removeCNINetwork(net) - Expect(session.ExitCode()).To(BeZero()) + Expect(session).Should(Exit(0)) result := podmanTest.Podman([]string{"run", "--network", net, "--mac-address", "92:d0:c6:00:29:34", ALPINE, "ip", "addr"}) result.WaitWithDefaultTimeout() - Expect(result.ExitCode()).To(Equal(0)) + Expect(result).Should(Exit(0)) Expect(result.OutputToString()).To(ContainSubstring("92:d0:c6:00:29:34")) }) }) |