summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-12-03 12:21:44 -0800
committerGitHub <noreply@github.com>2018-12-03 12:21:44 -0800
commit5f6ad82524ca7a3281c8464c84b4f9be4ff90aef (patch)
treed036677ca9be92e404858312b99f84b312673263 /test/e2e
parent03aafff4ef0ebd8fb03836d59dc2dacdc233696f (diff)
parent318bf7017bcb82da9f73cfce9e3a963b61252788 (diff)
downloadpodman-5f6ad82524ca7a3281c8464c84b4f9be4ff90aef.tar.gz
podman-5f6ad82524ca7a3281c8464c84b4f9be4ff90aef.tar.bz2
podman-5f6ad82524ca7a3281c8464c84b4f9be4ff90aef.zip
Merge pull request #1913 from baude/podexists
podman pod exists
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/exists_test.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/e2e/exists_test.go b/test/e2e/exists_test.go
index 9165e8902..d9652de4b 100644
--- a/test/e2e/exists_test.go
+++ b/test/e2e/exists_test.go
@@ -82,4 +82,36 @@ var _ = Describe("Podman image|container exists", func() {
Expect(session.ExitCode()).To(Equal(1))
})
+ It("podman pod exists in local storage by name", func() {
+ setup, rc, _ := podmanTest.CreatePod("foobar")
+ setup.WaitWithDefaultTimeout()
+ Expect(rc).To(Equal(0))
+
+ session := podmanTest.Podman([]string{"pod", "exists", "foobar"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+ It("podman pod exists in local storage by container ID", func() {
+ setup, rc, podID := podmanTest.CreatePod("")
+ setup.WaitWithDefaultTimeout()
+ Expect(rc).To(Equal(0))
+
+ session := podmanTest.Podman([]string{"pod", "exists", podID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+ It("podman pod exists in local storage by short container ID", func() {
+ setup, rc, podID := podmanTest.CreatePod("")
+ setup.WaitWithDefaultTimeout()
+ Expect(rc).To(Equal(0))
+
+ session := podmanTest.Podman([]string{"pod", "exists", podID[0:12]})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+ It("podman pod does not exist in local storage", func() {
+ session := podmanTest.Podman([]string{"pod", "exists", "foobar"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(1))
+ })
})