summaryrefslogtreecommitdiff
path: root/pkg/machine/e2e/ssh_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-06-02 04:24:01 -0400
committerGitHub <noreply@github.com>2022-06-02 04:24:01 -0400
commit2958aee08389aa5e89794f5e5b4f30ac3328d071 (patch)
tree3fa18d5bf4759bfe6281725760141e3cc65f1c49 /pkg/machine/e2e/ssh_test.go
parentf27f9de5e668afb50073f125f25f8f61618a5742 (diff)
parent4a834655118a83898a20b20663dfd048855fbf5f (diff)
downloadpodman-2958aee08389aa5e89794f5e5b4f30ac3328d071.tar.gz
podman-2958aee08389aa5e89794f5e5b4f30ac3328d071.tar.bz2
podman-2958aee08389aa5e89794f5e5b4f30ac3328d071.zip
Merge pull request #14417 from Luap99/machine-ssh
podman machine ssh: set correct exit code
Diffstat (limited to 'pkg/machine/e2e/ssh_test.go')
-rw-r--r--pkg/machine/e2e/ssh_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/machine/e2e/ssh_test.go b/pkg/machine/e2e/ssh_test.go
index 155d39a64..9ee31ac26 100644
--- a/pkg/machine/e2e/ssh_test.go
+++ b/pkg/machine/e2e/ssh_test.go
@@ -56,5 +56,12 @@ var _ = Describe("podman machine ssh", func() {
Expect(err).To(BeNil())
Expect(sshSession).To(Exit(0))
Expect(sshSession.outputToString()).To(ContainSubstring("Fedora CoreOS"))
+
+ // keep exit code
+ sshSession, err = mb.setName(name).setCmd(ssh.withSSHComand([]string{"false"})).run()
+ Expect(err).To(BeNil())
+ Expect(sshSession).To(Exit(1))
+ Expect(sshSession.outputToString()).To(Equal(""))
+ Expect(sshSession.errorToString()).To(Equal(""))
})
})