summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSujil02 <sushah@redhat.com>2020-04-02 22:56:59 -0400
committerSujil02 <sushah@redhat.com>2020-04-17 17:30:58 -0400
commit37f3b191d5318b7d25893eabf4e57b568c326773 (patch)
tree8c2792aa1e7b4846dffc5708cf13a0eb500f4a19 /test
parentaa97cb5f42a35de02d520f6c3006600505a3d6d9 (diff)
downloadpodman-37f3b191d5318b7d25893eabf4e57b568c326773.tar.gz
podman-37f3b191d5318b7d25893eabf4e57b568c326773.tar.bz2
podman-37f3b191d5318b7d25893eabf4e57b568c326773.zip
Add pod prune for api v2.
Add the ability to prune pods for api v2, Includes the addition of force flag, for client side prompt. Update test suite to support this use case. Signed-off-by: Sujil02 <sushah@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pod_prune_test.go23
1 files changed, 3 insertions, 20 deletions
diff --git a/test/e2e/pod_prune_test.go b/test/e2e/pod_prune_test.go
index 389d3cb27..d98383331 100644
--- a/test/e2e/pod_prune_test.go
+++ b/test/e2e/pod_prune_test.go
@@ -36,7 +36,7 @@ var _ = Describe("Podman pod prune", func() {
_, ec, _ := podmanTest.CreatePod("")
Expect(ec).To(Equal(0))
- result := podmanTest.Podman([]string{"pod", "prune"})
+ result := podmanTest.Podman([]string{"pod", "prune", "--force"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
})
@@ -49,7 +49,7 @@ var _ = Describe("Podman pod prune", func() {
ec2.WaitWithDefaultTimeout()
Expect(ec2.ExitCode()).To(Equal(0))
- result := podmanTest.Podman([]string{"pod", "prune"})
+ result := podmanTest.Podman([]string{"pod", "prune", "-f"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To((Equal(0)))
@@ -65,7 +65,7 @@ var _ = Describe("Podman pod prune", func() {
_, ec2, _ := podmanTest.RunLsContainerInPod("", podid)
Expect(ec2).To(Equal(0))
- result := podmanTest.Podman([]string{"pod", "prune"})
+ result := podmanTest.Podman([]string{"pod", "prune", "-f"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
@@ -73,21 +73,4 @@ var _ = Describe("Podman pod prune", func() {
result.WaitWithDefaultTimeout()
Expect(len(result.OutputToStringArray())).To(Equal(0))
})
-
- It("podman pod prune -f does remove a running container", func() {
- _, ec, podid := podmanTest.CreatePod("")
- Expect(ec).To(Equal(0))
-
- session := podmanTest.RunTopContainerInPod("", podid)
- session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
-
- result := podmanTest.Podman([]string{"pod", "prune", "-f"})
- result.WaitWithDefaultTimeout()
- Expect(result.ExitCode()).To(Equal(0))
-
- result = podmanTest.Podman([]string{"ps", "-q"})
- result.WaitWithDefaultTimeout()
- Expect(result.OutputToString()).To(BeEmpty())
- })
})