summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-10-31 19:03:08 +0100
committerGitHub <noreply@github.com>2019-10-31 19:03:08 +0100
commit1e750f7ca874ed24781de27cccf0346e5ec247bf (patch)
tree919b048f177df745bc9c3a0334d438cf42731574 /test/e2e
parent5af166ff513265b17aee92a9ce3a1522090d7dec (diff)
parentdc3e3af25613700bce3a8e2b2ce3e3f978ca0e9f (diff)
downloadpodman-1e750f7ca874ed24781de27cccf0346e5ec247bf.tar.gz
podman-1e750f7ca874ed24781de27cccf0346e5ec247bf.tar.bz2
podman-1e750f7ca874ed24781de27cccf0346e5ec247bf.zip
Merge pull request #4394 from vrothberg/fix-start
container start: fix regression when using name
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/start_test.go21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/e2e/start_test.go b/test/e2e/start_test.go
index da581f158..47b058845 100644
--- a/test/e2e/start_test.go
+++ b/test/e2e/start_test.go
@@ -57,15 +57,32 @@ var _ = Describe("Podman start", func() {
session = podmanTest.Podman([]string{"container", "start", cid})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(Equal(cid))
+ })
+
+ It("podman container start single container by short id", func() {
+ session := podmanTest.Podman([]string{"container", "create", "-d", ALPINE, "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ cid := session.OutputToString()
+ session = podmanTest.Podman([]string{"container", "start", cid[0:10]})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(Equal(cid))
})
It("podman start single container by name", func() {
- session := podmanTest.Podman([]string{"create", "-d", "--name", "foobar99", ALPINE, "ls"})
+ name := "foobar99"
+ session := podmanTest.Podman([]string{"create", "-d", "--name", name, ALPINE, "ls"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- session = podmanTest.Podman([]string{"start", "foobar99"})
+ session = podmanTest.Podman([]string{"start", name})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
+ if podmanTest.RemoteTest {
+ Skip("Container-start name check doesn't work on remote client. It always returns the full ID.")
+ }
+ Expect(session.OutputToString()).To(Equal(name))
})
It("podman start multiple containers", func() {