summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorSujil02 <sushah@redhat.com>2020-06-11 09:18:52 -0400
committerSujil02 <sushah@redhat.com>2020-06-15 02:57:55 -0400
commit4a3f3b5c02e43d64c68425de4306e310b4ef9ed6 (patch)
treefbde3f1b570bfd7290e5ab60a970bbbdcaedc5ad /pkg
parent3f026eb6a682a68e69f9376b72157a8f084e575c (diff)
downloadpodman-4a3f3b5c02e43d64c68425de4306e310b4ef9ed6.tar.gz
podman-4a3f3b5c02e43d64c68425de4306e310b4ef9ed6.tar.bz2
podman-4a3f3b5c02e43d64c68425de4306e310b4ef9ed6.zip
Adds more docker py test
Addes more docker py test Optimize test to import images from cache Rename test class and dir for python unittest framework Signed-off-by: Sujil02 <sushah@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/bindings/test/containers_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/pkg/bindings/test/containers_test.go b/pkg/bindings/test/containers_test.go
index 3b94b10eb..b987f0442 100644
--- a/pkg/bindings/test/containers_test.go
+++ b/pkg/bindings/test/containers_test.go
@@ -739,4 +739,23 @@ var _ = Describe("Podman containers ", func() {
//Expect(code).To(BeNumerically("==", http.StatusInternalServerError))
})
+ It("List containers with filters", func() {
+ var name = "top"
+ var name2 = "top2"
+ cid, err := bt.RunTopContainer(&name, bindings.PFalse, nil)
+ Expect(err).To(BeNil())
+ _, err = bt.RunTopContainer(&name2, bindings.PFalse, nil)
+ Expect(err).To(BeNil())
+ s := specgen.NewSpecGenerator(alpine.name, false)
+ s.Terminal = true
+ s.Command = []string{"date", "-R"}
+ _, err = containers.CreateWithSpec(bt.conn, s)
+ Expect(err).To(BeNil())
+ // Validate list container with id filter
+ filters := make(map[string][]string)
+ filters["id"] = []string{cid}
+ c, err := containers.List(bt.conn, filters, bindings.PTrue, nil, nil, nil, nil)
+ Expect(err).To(BeNil())
+ Expect(len(c)).To(Equal(1))
+ })
})