summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-05-23 10:17:59 -0400
committerGitHub <noreply@github.com>2022-05-23 10:17:59 -0400
commit7d00b0ea0d0c53ddba8d6aebdbce2f167aceccc5 (patch)
tree2c37b0bf4e687954b8d8f82dcf8e3021ec6fdedc /test/e2e
parentbe255287c929999ff018d0b8319e644b4ea77064 (diff)
parent633d5f1f8b8844d6e2fb3e2593768360c889ed76 (diff)
downloadpodman-7d00b0ea0d0c53ddba8d6aebdbce2f167aceccc5.tar.gz
podman-7d00b0ea0d0c53ddba8d6aebdbce2f167aceccc5.tar.bz2
podman-7d00b0ea0d0c53ddba8d6aebdbce2f167aceccc5.zip
Merge pull request #14281 from vrothberg/fix-14251
fix --init with /dev bind mount
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_test.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 182ae1888..828e92170 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -13,6 +13,7 @@ import (
"time"
"github.com/containers/common/pkg/cgroups"
+ "github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/rootless"
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/storage/pkg/stringid"
@@ -286,19 +287,20 @@ var _ = Describe("Podman run", func() {
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
conData := result.InspectContainerToJSON()
- Expect(conData[0]).To(HaveField("Path", "/dev/init"))
+ Expect(conData[0]).To(HaveField("Path", define.ContainerInitPath))
Expect(conData[0].Config.Annotations).To(HaveKeyWithValue("io.podman.annotations.init", "TRUE"))
})
It("podman run a container with --init and --init-path", func() {
- session := podmanTest.Podman([]string{"run", "--name", "test", "--init", "--init-path", "/usr/libexec/podman/catatonit", ALPINE, "ls"})
+ // Also bind-mount /dev (#14251).
+ session := podmanTest.Podman([]string{"run", "-v", "/dev:/dev", "--name", "test", "--init", "--init-path", "/usr/libexec/podman/catatonit", ALPINE, "ls"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
result := podmanTest.Podman([]string{"inspect", "test"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
conData := result.InspectContainerToJSON()
- Expect(conData[0]).To(HaveField("Path", "/dev/init"))
+ Expect(conData[0]).To(HaveField("Path", define.ContainerInitPath))
Expect(conData[0].Config.Annotations).To(HaveKeyWithValue("io.podman.annotations.init", "TRUE"))
})