summaryrefslogtreecommitdiff
path: root/test/e2e/play_build_test.go
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2021-12-01 08:19:55 -0700
committerEd Santiago <santiago@redhat.com>2021-12-02 07:54:53 -0700
commit478f2da5d6bedf6390be1c0f3928f9ec13894d6d (patch)
tree03b762f70d3ba918d378da0552e720a55731d2fa /test/e2e/play_build_test.go
parent6b5ecde76ebb177b1ab1dd9e9555fc198ad90858 (diff)
downloadpodman-478f2da5d6bedf6390be1c0f3928f9ec13894d6d.tar.gz
podman-478f2da5d6bedf6390be1c0f3928f9ec13894d6d.tar.bz2
podman-478f2da5d6bedf6390be1c0f3928f9ec13894d6d.zip
e2e tests: a little more minor cleanup
sed -i -e 's/Expect(\(.*\)\[\(\".*\"\)\])\.To(Equal(/Expect(\1).To(HaveKeyWithValue(\2, /' test/e2e/*_test.go ...with two manual tweaks, because this converted: Expect(foo["bar"]).To(Equal("")) -> Expect(foo).To(HaveKeyWithValue("bar","")) It looks like the intention of the test was, instead: ...To(Not(HaveKey("bar"))) Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/e2e/play_build_test.go')
-rw-r--r--test/e2e/play_build_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/e2e/play_build_test.go b/test/e2e/play_build_test.go
index 9bdf9d06b..a56560634 100644
--- a/test/e2e/play_build_test.go
+++ b/test/e2e/play_build_test.go
@@ -125,7 +125,7 @@ LABEL marge=mom
Expect(inspect).Should(Exit(0))
inspectData := inspect.InspectContainerToJSON()
Expect(len(inspectData)).To(BeNumerically(">", 0))
- Expect(inspectData[0].Config.Labels["homer"]).To(Equal("dad"))
+ Expect(inspectData[0].Config.Labels).To(HaveKeyWithValue("homer", "dad"))
})
It("Check that image is built using Containerfile", func() {
@@ -162,7 +162,7 @@ LABEL marge=mom
Expect(inspect).Should(Exit(0))
inspectData := inspect.InspectContainerToJSON()
Expect(len(inspectData)).To(BeNumerically(">", 0))
- Expect(inspectData[0].Config.Labels["homer"]).To(Equal("dad"))
+ Expect(inspectData[0].Config.Labels).To(HaveKeyWithValue("homer", "dad"))
})
It("Do not build image if already in the local store", func() {
@@ -208,8 +208,8 @@ LABEL marge=mom
Expect(inspect).Should(Exit(0))
inspectData := inspect.InspectContainerToJSON()
Expect(len(inspectData)).To(BeNumerically(">", 0))
- Expect(inspectData[0].Config.Labels["homer"]).To(Equal(""))
- Expect(inspectData[0].Config.Labels["marge"]).To(Equal("mom"))
+ Expect(inspectData[0].Config.Labels).To(Not(HaveKey("homer")))
+ Expect(inspectData[0].Config.Labels).To(HaveKeyWithValue("marge", "mom"))
})
It("--build should override image in store", func() {
@@ -255,8 +255,8 @@ LABEL marge=mom
Expect(inspect).Should(Exit(0))
inspectData := inspect.InspectContainerToJSON()
Expect(len(inspectData)).To(BeNumerically(">", 0))
- Expect(inspectData[0].Config.Labels["homer"]).To(Equal("dad"))
- Expect(inspectData[0].Config.Labels["marge"]).To(Equal(""))
+ Expect(inspectData[0].Config.Labels).To(HaveKeyWithValue("homer", "dad"))
+ Expect(inspectData[0].Config.Labels).To(Not(HaveKey("marge")))
})
})