mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-27 10:07:49 +00:00
Add a test for removing dependencies with rm -fa
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
parent
bafb3d6cc5
commit
b75ff3a8fa
1 changed files with 21 additions and 0 deletions
|
|
@ -322,4 +322,25 @@ var _ = Describe("Podman rm", func() {
|
|||
Expect(session1).Should(Exit(0))
|
||||
Expect(session1.OutputToString()).To(BeEquivalentTo(cid4))
|
||||
})
|
||||
|
||||
It("podman rm -fa with dependencies", func() {
|
||||
ctr1Name := "ctr1"
|
||||
ctr1 := podmanTest.RunTopContainer(ctr1Name)
|
||||
ctr1.WaitWithDefaultTimeout()
|
||||
Expect(ctr1).Should(Exit(0))
|
||||
cid1 := ctr1.OutputToString()
|
||||
|
||||
ctr2 := podmanTest.Podman([]string{"run", "-d", "--network", fmt.Sprintf("container:%s", ctr1Name), ALPINE, "top"})
|
||||
ctr2.WaitWithDefaultTimeout()
|
||||
Expect(ctr2).Should(Exit(0))
|
||||
cid2 := ctr2.OutputToString()
|
||||
|
||||
rm := podmanTest.Podman([]string{"rm", "-fa"})
|
||||
rm.WaitWithDefaultTimeout()
|
||||
Expect(rm).Should(Exit(0))
|
||||
Expect(rm.ErrorToString()).To(BeEmpty(), "rm -fa error logged")
|
||||
Expect(rm.OutputToStringArray()).Should(ConsistOf(cid1, cid2))
|
||||
|
||||
Expect(podmanTest.NumberOfContainers()).To(Equal(0))
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue