summaryrefslogtreecommitdiff
path: root/pkg/machine/e2e/stop_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/machine/e2e/stop_test.go')
-rw-r--r--pkg/machine/e2e/stop_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/machine/e2e/stop_test.go b/pkg/machine/e2e/stop_test.go
index 5dee6a345..0c27045a6 100644
--- a/pkg/machine/e2e/stop_test.go
+++ b/pkg/machine/e2e/stop_test.go
@@ -3,6 +3,7 @@ package e2e
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
+ . "github.com/onsi/gomega/gexec"
)
var _ = Describe("podman machine stop", func() {
@@ -23,24 +24,24 @@ var _ = Describe("podman machine stop", func() {
reallyLongName := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
session, err := mb.setName(reallyLongName).setCmd(&i).run()
Expect(err).To(BeNil())
- Expect(session.ExitCode()).To(Equal(125))
+ Expect(session).To(Exit(125))
})
It("Stop running machine", func() {
i := new(initMachine)
session, err := mb.setCmd(i.withImagePath(mb.imagePath).withNow()).run()
Expect(err).To(BeNil())
- Expect(session.ExitCode()).To(Equal(0))
+ Expect(session).To(Exit(0))
stop := new(stopMachine)
// Removing a running machine should fail
stopSession, err := mb.setCmd(stop).run()
Expect(err).To(BeNil())
- Expect(stopSession.ExitCode()).To(Equal(0))
+ Expect(stopSession).To(Exit(0))
// Stopping it again should not result in an error
stopAgain, err := mb.setCmd(stop).run()
Expect(err).To(BeNil())
- Expect(stopAgain.ExitCode()).To(BeZero())
+ Expect(stopAgain).To(Exit((0)))
})
})