summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpod/runtime_ctr.go3
-rw-r--r--test/e2e/prune_test.go3
2 files changed, 4 insertions, 2 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 3dc8d3d0f..1d880531e 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -869,7 +869,8 @@ func (r *Runtime) PruneContainers(filterFuncs []ContainerFilter) (map[string]int
logrus.Error(err)
return false
}
- if state == define.ContainerStateStopped || state == define.ContainerStateExited {
+ if state == define.ContainerStateStopped || state == define.ContainerStateExited ||
+ state == define.ContainerStateCreated || state == define.ContainerStateConfigured {
return true
}
return false
diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go
index e8a208c3c..466a4f739 100644
--- a/test/e2e/prune_test.go
+++ b/test/e2e/prune_test.go
@@ -22,7 +22,6 @@ var _ = Describe("Podman prune", func() {
)
BeforeEach(func() {
- Skip(v2fail)
tempdir, err = CreateTempDirInTempDir()
if err != nil {
os.Exit(1)
@@ -149,6 +148,7 @@ var _ = Describe("Podman prune", func() {
It("podman system image prune unused images", func() {
SkipIfRemote()
+ Skip(v2fail)
podmanTest.RestoreAllArtifacts()
podmanTest.BuildImage(pruneImage, "alpine_bash:latest", "true")
prune := podmanTest.PodmanNoCache([]string{"system", "prune", "-a", "--force"})
@@ -162,6 +162,7 @@ var _ = Describe("Podman prune", func() {
})
It("podman system prune pods", func() {
+ Skip(v2fail)
session := podmanTest.Podman([]string{"pod", "create"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))