summaryrefslogtreecommitdiff
path: root/test/e2e/inspect_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-05-03 16:37:54 -0400
committerGitHub <noreply@github.com>2022-05-03 16:37:54 -0400
commit3210a3f4257d19744abd4ae2302018b16edb2507 (patch)
tree97f6f9e2c4bfd41191971c5658484012ce1b4826 /test/e2e/inspect_test.go
parent3af1396f269463aa7640e9cf1dcc84a413d99ee0 (diff)
parent3ab8fa679c57a653f7ea012f79fa453ae8133108 (diff)
downloadpodman-3210a3f4257d19744abd4ae2302018b16edb2507.tar.gz
podman-3210a3f4257d19744abd4ae2302018b16edb2507.tar.bz2
podman-3210a3f4257d19744abd4ae2302018b16edb2507.zip
Merge pull request #14100 from mheon/incremental_backports
[v4.1] Incremental backports
Diffstat (limited to 'test/e2e/inspect_test.go')
-rw-r--r--test/e2e/inspect_test.go21
1 files changed, 10 insertions, 11 deletions
diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go
index bb5a3a6ad..6fe850f0b 100644
--- a/test/e2e/inspect_test.go
+++ b/test/e2e/inspect_test.go
@@ -24,7 +24,6 @@ var _ = Describe("Podman inspect", func() {
}
podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
- podmanTest.SeedImages()
})
AfterEach(func() {
@@ -189,7 +188,7 @@ var _ = Describe("Podman inspect", func() {
imageData := session.InspectImageJSON()
Expect(imageData[0].HealthCheck.Timeout).To(BeNumerically("==", 3000000000))
Expect(imageData[0].HealthCheck.Interval).To(BeNumerically("==", 60000000000))
- Expect(imageData[0].HealthCheck.Test).To(Equal([]string{"CMD-SHELL", "curl -f http://localhost/ || exit 1"}))
+ Expect(imageData[0].HealthCheck).To(HaveField("Test", []string{"CMD-SHELL", "curl -f http://localhost/ || exit 1"}))
})
It("podman inspect --latest with no container fails", func() {
@@ -217,7 +216,7 @@ var _ = Describe("Podman inspect", func() {
imageJSON := imageInspect.InspectImageJSON()
Expect(imageJSON).To(HaveLen(1))
- Expect(baseJSON[0].ID).To(Equal(imageJSON[0].ID))
+ Expect(baseJSON[0]).To(HaveField("ID", imageJSON[0].ID))
})
It("podman [image, container] inspect on container", func() {
@@ -242,7 +241,7 @@ var _ = Describe("Podman inspect", func() {
imageInspect.WaitWithDefaultTimeout()
Expect(imageInspect).To(ExitWithError())
- Expect(baseJSON[0].ID).To(Equal(ctrJSON[0].ID))
+ Expect(baseJSON[0]).To(HaveField("ID", ctrJSON[0].ID))
})
It("podman inspect always produces a valid array", func() {
@@ -264,7 +263,7 @@ var _ = Describe("Podman inspect", func() {
Expect(baseInspect).To(ExitWithError())
baseJSON := baseInspect.InspectContainerToJSON()
Expect(baseJSON).To(HaveLen(1))
- Expect(baseJSON[0].Name).To(Equal(ctrName))
+ Expect(baseJSON[0]).To(HaveField("Name", ctrName))
})
It("podman inspect container + image with same name gives container", func() {
@@ -283,7 +282,7 @@ var _ = Describe("Podman inspect", func() {
Expect(baseInspect).Should(Exit(0))
baseJSON := baseInspect.InspectContainerToJSON()
Expect(baseJSON).To(HaveLen(1))
- Expect(baseJSON[0].Name).To(Equal(ctrName))
+ Expect(baseJSON[0]).To(HaveField("Name", ctrName))
})
It("podman inspect - HostConfig.SecurityOpt ", func() {
@@ -307,7 +306,7 @@ var _ = Describe("Podman inspect", func() {
Expect(baseInspect).Should(Exit(0))
baseJSON := baseInspect.InspectContainerToJSON()
Expect(baseJSON).To(HaveLen(1))
- Expect(baseJSON[0].HostConfig.SecurityOpt).To(Equal([]string{"label=type:spc_t,label=level:s0", "seccomp=unconfined"}))
+ Expect(baseJSON[0].HostConfig).To(HaveField("SecurityOpt", []string{"label=type:spc_t,label=level:s0", "seccomp=unconfined"}))
})
It("podman inspect pod", func() {
@@ -321,7 +320,7 @@ var _ = Describe("Podman inspect", func() {
Expect(inspect).Should(Exit(0))
Expect(inspect.OutputToString()).To(BeValidJSON())
podData := inspect.InspectPodArrToJSON()
- Expect(podData[0].Name).To(Equal(podName))
+ Expect(podData[0]).To(HaveField("Name", podName))
})
It("podman inspect pod with type", func() {
@@ -335,7 +334,7 @@ var _ = Describe("Podman inspect", func() {
Expect(inspect).Should(Exit(0))
Expect(inspect.OutputToString()).To(BeValidJSON())
podData := inspect.InspectPodArrToJSON()
- Expect(podData[0].Name).To(Equal(podName))
+ Expect(podData[0]).To(HaveField("Name", podName))
})
It("podman inspect latest pod", func() {
@@ -350,7 +349,7 @@ var _ = Describe("Podman inspect", func() {
Expect(inspect).Should(Exit(0))
Expect(inspect.OutputToString()).To(BeValidJSON())
podData := inspect.InspectPodArrToJSON()
- Expect(podData[0].Name).To(Equal(podName))
+ Expect(podData[0]).To(HaveField("Name", podName))
})
It("podman inspect latest defaults to latest container", func() {
SkipIfRemote("--latest flag n/a")
@@ -371,7 +370,7 @@ var _ = Describe("Podman inspect", func() {
Expect(inspect).Should(Exit(0))
Expect(inspect.OutputToString()).To(BeValidJSON())
containerData := inspect.InspectContainerToJSON()
- Expect(containerData[0].Name).To(Equal(infra))
+ Expect(containerData[0]).To(HaveField("Name", infra))
})
It("podman inspect network", func() {