aboutsummaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-09-08 16:36:08 +0200
committerGitHub <noreply@github.com>2022-09-08 16:36:08 +0200
commiteb758c5f583aff06accb1eef08f1b62509ca813c (patch)
treea23a23de3b603b237262bd8586f2ecbf386e9081 /test/e2e
parent95eff1aa402c3d159c8ad25d8140b879d5feccf2 (diff)
parentd10e77e1bcd25306ab8afd4ce7da16eed3c67840 (diff)
downloadpodman-eb758c5f583aff06accb1eef08f1b62509ca813c.tar.gz
podman-eb758c5f583aff06accb1eef08f1b62509ca813c.tar.bz2
podman-eb758c5f583aff06accb1eef08f1b62509ca813c.zip
Merge pull request #15675 from Luap99/pod-inspect
fix podman pod inspect to support multiple pods
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/common_test.go2
-rw-r--r--test/e2e/pod_inspect_test.go17
2 files changed, 18 insertions, 1 deletions
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go
index 2d7c47a7f..8fe89f32e 100644
--- a/test/e2e/common_test.go
+++ b/test/e2e/common_test.go
@@ -571,7 +571,7 @@ func (s *PodmanSessionIntegration) InspectContainerToJSON() []define.InspectCont
func (s *PodmanSessionIntegration) InspectPodToJSON() define.InspectPodData {
var i define.InspectPodData
err := jsoniter.Unmarshal(s.Out.Contents(), &i)
- Expect(err).To(BeNil())
+ Expect(err).ToNot(HaveOccurred())
return i
}
diff --git a/test/e2e/pod_inspect_test.go b/test/e2e/pod_inspect_test.go
index 351317cc5..cefdee40a 100644
--- a/test/e2e/pod_inspect_test.go
+++ b/test/e2e/pod_inspect_test.go
@@ -118,4 +118,21 @@ var _ = Describe("Podman pod inspect", func() {
Expect(inspectOut.OutputToString()).To(ContainSubstring(macAddr))
})
+
+ It("podman inspect two pods", func() {
+ _, ec, podid1 := podmanTest.CreatePod(nil)
+ Expect(ec).To(Equal(0))
+
+ _, ec, podid2 := podmanTest.CreatePod(nil)
+ Expect(ec).To(Equal(0))
+
+ inspect := podmanTest.Podman([]string{"pod", "inspect", podid1, podid2})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect).Should(Exit(0))
+ Expect(inspect.OutputToString()).To(BeValidJSON())
+ podData := inspect.InspectPodArrToJSON()
+ Expect(podData).To(HaveLen(2))
+ Expect(podData[0]).To(HaveField("ID", podid1))
+ Expect(podData[1]).To(HaveField("ID", podid2))
+ })
})