diff options
Diffstat (limited to 'pkg/bindings/test/containers_test.go')
-rw-r--r-- | pkg/bindings/test/containers_test.go | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/pkg/bindings/test/containers_test.go b/pkg/bindings/test/containers_test.go index cb9e0721b..4d1361746 100644 --- a/pkg/bindings/test/containers_test.go +++ b/pkg/bindings/test/containers_test.go @@ -571,7 +571,7 @@ var _ = Describe("Podman containers ", func() { // Valid filter params container should be pruned now. filters := map[string][]string{ - "until": {"0s"}, + "until": {"5000000000"}, //Friday, June 11, 2128 } pruneResponse, err = containers.Prune(bt.conn, new(containers.PruneOptions).WithFilters(filters)) Expect(err).To(BeNil()) @@ -579,6 +579,26 @@ var _ = Describe("Podman containers ", func() { Expect(len(reports.PruneReportsIds(pruneResponse))).To(Equal(1)) }) + It("podman list containers with until filter", func() { + var name = "top" + _, err := bt.RunTopContainer(&name, nil) + Expect(err).To(BeNil()) + + filters := map[string][]string{ + "until": {"5000000000"}, //Friday, June 11, 2128 + } + c, err := containers.List(bt.conn, new(containers.ListOptions).WithFilters(filters).WithAll(true)) + Expect(err).To(BeNil()) + Expect(len(c)).To(Equal(1)) + + filters = map[string][]string{ + "until": {"500000"}, // Tuesday, January 6, 1970 + } + c, err = containers.List(bt.conn, new(containers.ListOptions).WithFilters(filters).WithAll(true)) + Expect(err).To(BeNil()) + Expect(len(c)).To(Equal(0)) + }) + It("podman prune running containers", func() { // Start the container. var name = "top" |