summaryrefslogtreecommitdiff
path: root/test/e2e/build_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-23 15:14:10 +0100
committerGitHub <noreply@github.com>2021-12-23 15:14:10 +0100
commit5570b5b9751894d509be2b478685097cf8fde923 (patch)
tree69c520e6e114309c69bd2c1e2a73736de675a74f /test/e2e/build_test.go
parenta7f1c05366c86a05e247049f8837b4aadc54fc50 (diff)
parent1aa4e4d4d183aa07ea7453e4be70d31eaa8edb13 (diff)
downloadpodman-5570b5b9751894d509be2b478685097cf8fde923.tar.gz
podman-5570b5b9751894d509be2b478685097cf8fde923.tar.bz2
podman-5570b5b9751894d509be2b478685097cf8fde923.zip
Merge pull request #12679 from vrothberg/fix-12671
clarify `io.podman.annotations.seccomp`
Diffstat (limited to 'test/e2e/build_test.go')
-rw-r--r--test/e2e/build_test.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go
index 5ed873f78..d4f0a2b04 100644
--- a/test/e2e/build_test.go
+++ b/test/e2e/build_test.go
@@ -238,19 +238,25 @@ var _ = Describe("Podman build", func() {
Expect("sha256:" + data[0].ID).To(Equal(string(id)))
})
- It("podman Test PATH in built image", func() {
+ It("podman Test PATH and reserved annotation in built image", func() {
path := "/tmp:/bin:/usr/bin:/usr/sbin"
session := podmanTest.Podman([]string{
- "build", "--pull-never", "-f", "build/basicalpine/Containerfile.path", "-t", "test-path",
+ "build", "--annotation", "io.podman.annotations.seccomp=foobar", "--pull-never", "-f", "build/basicalpine/Containerfile.path", "-t", "test-path",
})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- session = podmanTest.Podman([]string{"run", "test-path", "printenv", "PATH"})
+ session = podmanTest.Podman([]string{"run", "--name", "foobar", "test-path", "printenv", "PATH"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
stdoutLines := session.OutputToStringArray()
Expect(stdoutLines[0]).Should(Equal(path))
+
+ // Reserved annotation should not be applied from the image to the container.
+ session = podmanTest.Podman([]string{"inspect", "foobar"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ Expect(session.OutputToString()).NotTo(ContainSubstring("io.podman.annotations.seccomp"))
})
It("podman build --http_proxy flag", func() {