aboutsummaryrefslogtreecommitdiff
path: root/pkg/machine/e2e/start_test.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2022-04-27 15:16:25 -0500
committerBrent Baude <bbaude@redhat.com>2022-04-27 15:44:02 -0500
commit83a75d2a3d6a6dd0661f1f44aff13639412c390b (patch)
tree530f5907adac30a42e5eac1f584d13d90f994d5e /pkg/machine/e2e/start_test.go
parent60d6cc8e1eb33be2f9822e227a7cadf0dceb5543 (diff)
downloadpodman-83a75d2a3d6a6dd0661f1f44aff13639412c390b.tar.gz
podman-83a75d2a3d6a6dd0661f1f44aff13639412c390b.tar.bz2
podman-83a75d2a3d6a6dd0661f1f44aff13639412c390b.zip
Produce better test error messages
As Ed has pointed out, the form of Expect(session).To(Exit(0)) provides much better error messages. Let's make Ed happy. Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/machine/e2e/start_test.go')
-rw-r--r--pkg/machine/e2e/start_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/machine/e2e/start_test.go b/pkg/machine/e2e/start_test.go
index 1cda0e8f1..1de66eb9a 100644
--- a/pkg/machine/e2e/start_test.go
+++ b/pkg/machine/e2e/start_test.go
@@ -4,6 +4,7 @@ import (
"github.com/containers/podman/v4/pkg/machine"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
+ . "github.com/onsi/gomega/gexec"
)
var _ = Describe("podman machine start", func() {
@@ -22,11 +23,11 @@ var _ = Describe("podman machine start", func() {
i := new(initMachine)
session, err := mb.setCmd(i.withImagePath(mb.imagePath)).run()
Expect(err).To(BeNil())
- Expect(session.ExitCode()).To(Equal(0))
+ Expect(session).To(Exit(0))
s := new(startMachine)
startSession, err := mb.setCmd(s).run()
Expect(err).To(BeNil())
- Expect(startSession.ExitCode()).To(Equal(0))
+ Expect(startSession).To(Exit(0))
info, ec, err := mb.toQemuInspectInfo()
Expect(err).To(BeNil())