summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-15 13:11:24 -0400
committerGitHub <noreply@github.com>2020-06-15 13:11:24 -0400
commit2716234af3bf4e11b8017c67a770985ea8382baf (patch)
treea80cc5ecbce9302ad02bc10d935b8dfb93a8f184 /pkg/bindings
parentb005465cb0ba78fea4563afefc34dac3df6fbd3d (diff)
parent4a3f3b5c02e43d64c68425de4306e310b4ef9ed6 (diff)
downloadpodman-2716234af3bf4e11b8017c67a770985ea8382baf.tar.gz
podman-2716234af3bf4e11b8017c67a770985ea8382baf.tar.bz2
podman-2716234af3bf4e11b8017c67a770985ea8382baf.zip
Merge pull request #6603 from sujil02/python-test
Adds more docker py test
Diffstat (limited to 'pkg/bindings')
-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))
+ })
})