summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-04-17 08:55:59 -0700
committerGitHub <noreply@github.com>2019-04-17 08:55:59 -0700
commit799d4667c1c33ac025741e2082739999f5b4563a (patch)
tree9fe87a7fc5f470314f754b8452163c4f59fd1a2c /test/e2e
parentd0c5e216ca508d195b805d0e48b159cfbff868a9 (diff)
parent4319552cf89e72925a80c63f427e5ef0a6376046 (diff)
downloadpodman-799d4667c1c33ac025741e2082739999f5b4563a.tar.gz
podman-799d4667c1c33ac025741e2082739999f5b4563a.tar.bz2
podman-799d4667c1c33ac025741e2082739999f5b4563a.zip
Merge pull request #2936 from haircommander/pod-prune
Add podman pod prune
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/prune_test.go35
1 files changed, 34 insertions, 1 deletions
diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go
index 682f7ff2b..544d54b50 100644
--- a/test/e2e/prune_test.go
+++ b/test/e2e/prune_test.go
@@ -14,7 +14,7 @@ LABEL RUN podman --version
RUN apk update
RUN apk add bash`
-var _ = Describe("Podman rm", func() {
+var _ = Describe("Podman prune", func() {
var (
tempdir string
err error
@@ -101,4 +101,37 @@ var _ = Describe("Podman rm", func() {
Expect(len(images.OutputToStringArray())).To(Equal(0))
})
+ It("podman system prune pods", func() {
+ SkipIfRemote()
+
+ session := podmanTest.Podman([]string{"pod", "create"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"pod", "create"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"pod", "start", "-l"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"pod", "stop", "-l"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ pods := podmanTest.Podman([]string{"pod", "ps"})
+ pods.WaitWithDefaultTimeout()
+ Expect(pods.ExitCode()).To(Equal(0))
+ Expect(len(pods.OutputToStringArray())).To(Equal(3))
+
+ prune := podmanTest.Podman([]string{"system", "prune", "-f"})
+ prune.WaitWithDefaultTimeout()
+ Expect(prune.ExitCode()).To(Equal(0))
+
+ pods = podmanTest.Podman([]string{"pod", "ps"})
+ pods.WaitWithDefaultTimeout()
+ Expect(pods.ExitCode()).To(Equal(0))
+ Expect(len(pods.OutputToStringArray())).To(Equal(2))
+ })
})