summaryrefslogtreecommitdiff
path: root/test/e2e/ps_test.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-01-31 18:47:51 -0600
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-01 19:04:00 +0000
commit0387f69d39b7ff15c78ff39ddb350523c73719d6 (patch)
treed19cbbeeaa105f7ee4dfaa733b0808d76a79f0cb /test/e2e/ps_test.go
parent03cfe5ebbee306ee4aa84c74bbff83712e50fb1c (diff)
downloadpodman-0387f69d39b7ff15c78ff39ddb350523c73719d6.tar.gz
podman-0387f69d39b7ff15c78ff39ddb350523c73719d6.tar.bz2
podman-0387f69d39b7ff15c78ff39ddb350523c73719d6.zip
Migrate kill tests to ginkgo
Migrate kill tests to the ginkgo suite and remove the podman_kill bats. Signed-off-by: baude <bbaude@redhat.com> Closes: #281 Approved by: baude
Diffstat (limited to 'test/e2e/ps_test.go')
-rw-r--r--test/e2e/ps_test.go68
1 files changed, 26 insertions, 42 deletions
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go
index 690015552..d0aa0bd7c 100644
--- a/test/e2e/ps_test.go
+++ b/test/e2e/ps_test.go
@@ -47,9 +47,8 @@ var _ = Describe("Podman ps", func() {
})
It("podman ps all", func() {
- session := podmanTest.RunLsContainer("")
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ _, ec, _ := podmanTest.RunLsContainer("")
+ Expect(ec).To(Equal(0))
result := podmanTest.Podman([]string{"ps", "-a"})
result.WaitWithDefaultTimeout()
@@ -58,9 +57,8 @@ var _ = Describe("Podman ps", func() {
})
It("podman ps size flag", func() {
- session := podmanTest.RunLsContainer("")
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ _, ec, _ := podmanTest.RunLsContainer("")
+ Expect(ec).To(Equal(0))
result := podmanTest.Podman([]string{"ps", "-a", "--size"})
result.WaitWithDefaultTimeout()
@@ -69,10 +67,8 @@ var _ = Describe("Podman ps", func() {
})
It("podman ps quiet flag", func() {
- session := podmanTest.RunLsContainer("")
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
- fullCid := session.OutputToString()
+ _, ec, fullCid := podmanTest.RunLsContainer("")
+ Expect(ec).To(Equal(0))
result := podmanTest.Podman([]string{"ps", "-a", "-q"})
result.WaitWithDefaultTimeout()
@@ -82,9 +78,8 @@ var _ = Describe("Podman ps", func() {
})
It("podman ps latest flag", func() {
- session := podmanTest.RunLsContainer("")
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ _, ec, _ := podmanTest.RunLsContainer("")
+ Expect(ec).To(Equal(0))
result := podmanTest.Podman([]string{"ps", "--latest"})
result.WaitWithDefaultTimeout()
@@ -93,18 +88,15 @@ var _ = Describe("Podman ps", func() {
})
It("podman ps last flag", func() {
- session := podmanTest.RunLsContainer("test1")
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ _, ec, _ := podmanTest.RunLsContainer("test1")
+ Expect(ec).To(Equal(0))
- session = podmanTest.RunLsContainer("test2")
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ _, ec, _ = podmanTest.RunLsContainer("test2")
+ Expect(ec).To(Equal(0))
- session = podmanTest.RunLsContainer("test3")
- session.WaitWithDefaultTimeout()
+ _, ec, _ = podmanTest.RunLsContainer("test3")
+ Expect(ec).To(Equal(0))
- Expect(session.ExitCode()).To(Equal(0))
result := podmanTest.Podman([]string{"ps", "--last", "2"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
@@ -112,10 +104,8 @@ var _ = Describe("Podman ps", func() {
})
It("podman ps no-trunc", func() {
- session := podmanTest.RunLsContainer("test1")
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
- fullCid := session.OutputToString()
+ _, ec, fullCid := podmanTest.RunLsContainer("")
+ Expect(ec).To(Equal(0))
result := podmanTest.Podman([]string{"ps", "-aq", "--no-trunc"})
result.WaitWithDefaultTimeout()
@@ -125,9 +115,8 @@ var _ = Describe("Podman ps", func() {
})
It("podman ps namespace flag", func() {
- session := podmanTest.RunLsContainer("test1")
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ _, ec, _ := podmanTest.RunLsContainer("")
+ Expect(ec).To(Equal(0))
result := podmanTest.Podman([]string{"ps", "-a", "--namespace"})
result.WaitWithDefaultTimeout()
@@ -136,9 +125,8 @@ var _ = Describe("Podman ps", func() {
})
It("podman ps namespace flag with json format", func() {
- session := podmanTest.RunLsContainer("test1")
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ _, ec, _ := podmanTest.RunLsContainer("test1")
+ Expect(ec).To(Equal(0))
result := podmanTest.Podman([]string{"ps", "-a", "--ns", "--format", "json"})
result.WaitWithDefaultTimeout()
@@ -147,9 +135,8 @@ var _ = Describe("Podman ps", func() {
})
It("podman ps namespace flag with go template format", func() {
- session := podmanTest.RunLsContainer("test1")
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ _, ec, _ := podmanTest.RunLsContainer("test1")
+ Expect(ec).To(Equal(0))
result := podmanTest.Podman([]string{"ps", "-a", "--format", "\"table {{.ID}} {{.Image}} {{.Labels}}\""})
result.WaitWithDefaultTimeout()
@@ -158,9 +145,8 @@ var _ = Describe("Podman ps", func() {
})
It("podman ps ancestor filter flag", func() {
- session := podmanTest.RunLsContainer("test1")
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ _, ec, _ := podmanTest.RunLsContainer("test1")
+ Expect(ec).To(Equal(0))
result := podmanTest.Podman([]string{"ps", "-a", "--filter", "ancestor=docker.io/library/alpine:latest"})
result.WaitWithDefaultTimeout()
@@ -168,10 +154,8 @@ var _ = Describe("Podman ps", func() {
})
It("podman ps id filter flag", func() {
- session := podmanTest.RunLsContainer("test1")
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
- fullCid := session.OutputToString()
+ _, ec, fullCid := podmanTest.RunLsContainer("")
+ Expect(ec).To(Equal(0))
result := podmanTest.Podman([]string{"ps", "-a", "--filter", fmt.Sprintf("id=%s", fullCid)})
result.WaitWithDefaultTimeout()