diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-09-15 21:01:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-15 21:01:23 +0200 |
commit | df73f606ef45e3ec3358968090681a946083cd6f (patch) | |
tree | f8f34d772e7e4eb1716a3b3d3103fee2b21dfb06 /test/e2e | |
parent | 50c538b3cc7a218fe009180bbe20b0c464add6f7 (diff) | |
parent | e19e0de5faf31137fa0197ea014d4615e641d33a (diff) | |
download | podman-df73f606ef45e3ec3358968090681a946083cd6f.tar.gz podman-df73f606ef45e3ec3358968090681a946083cd6f.tar.bz2 podman-df73f606ef45e3ec3358968090681a946083cd6f.zip |
Merge pull request #15757 from mheon/fix_15526
Introduce graph-based pod container removal
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/pod_rm_test.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/e2e/pod_rm_test.go b/test/e2e/pod_rm_test.go index a5eab7eed..364ef54d5 100644 --- a/test/e2e/pod_rm_test.go +++ b/test/e2e/pod_rm_test.go @@ -318,4 +318,31 @@ var _ = Describe("Podman pod rm", func() { result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) }) + + It("podman pod rm pod with infra container and running container", func() { + podName := "testPod" + ctrName := "testCtr" + + ctrAndPod := podmanTest.Podman([]string{"run", "-d", "--pod", fmt.Sprintf("new:%s", podName), "--name", ctrName, ALPINE, "top"}) + ctrAndPod.WaitWithDefaultTimeout() + Expect(ctrAndPod).Should(Exit(0)) + + removePod := podmanTest.Podman([]string{"pod", "rm", "-a"}) + removePod.WaitWithDefaultTimeout() + Expect(removePod).Should(Not(Exit(0))) + + ps := podmanTest.Podman([]string{"pod", "ps"}) + ps.WaitWithDefaultTimeout() + Expect(ps).Should(Exit(0)) + Expect(ps.OutputToString()).To(ContainSubstring(podName)) + + removePodForce := podmanTest.Podman([]string{"pod", "rm", "-af"}) + removePodForce.WaitWithDefaultTimeout() + Expect(removePodForce).Should(Exit(0)) + + ps2 := podmanTest.Podman([]string{"pod", "ps"}) + ps2.WaitWithDefaultTimeout() + Expect(ps2).Should(Exit(0)) + Expect(ps2.OutputToString()).To(Not(ContainSubstring(podName))) + }) }) |