mirror of
https://github.com/containers/podman.git
synced 2025-08-20 07:17:30 +08:00
Merge pull request #1942 from baude/rmi_test
test for rmi with children
This commit is contained in:
@ -250,4 +250,25 @@ var _ = Describe("Podman rmi", func() {
|
||||
session2.WaitWithDefaultTimeout()
|
||||
Expect(session2.ExitCode()).To(Equal(0))
|
||||
})
|
||||
|
||||
It("podman rmi -a with parent|child images", func() {
|
||||
dockerfile := `FROM docker.io/library/alpine:latest AS base
|
||||
RUN touch /1
|
||||
ENV LOCAL=/1
|
||||
RUN find $LOCAL
|
||||
FROM base
|
||||
RUN find $LOCAL
|
||||
|
||||
`
|
||||
podmanTest.BuildImage(dockerfile, "test", "true")
|
||||
session := podmanTest.Podman([]string{"rmi", "-a"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
fmt.Println(session.OutputToString())
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
images := podmanTest.Podman([]string{"images", "--all"})
|
||||
images.WaitWithDefaultTimeout()
|
||||
Expect(images.ExitCode()).To(Equal(0))
|
||||
Expect(len(images.OutputToStringArray())).To(Equal(0))
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user