diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-21 05:52:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-21 05:52:09 -0400 |
commit | 1682e60dac14d9f32ae02c5f3286b3309cd9b128 (patch) | |
tree | 897b1e8d739babee529c39a6738923099b51cbf2 /test/e2e | |
parent | 0d26a573e3cf8cc5baea84206a86cb83b433b6d5 (diff) | |
parent | 1405c3a20524134fed8371b4e9f5e9900a050cce (diff) | |
download | podman-1682e60dac14d9f32ae02c5f3286b3309cd9b128.tar.gz podman-1682e60dac14d9f32ae02c5f3286b3309cd9b128.tar.bz2 podman-1682e60dac14d9f32ae02c5f3286b3309cd9b128.zip |
Merge pull request #7026 from edsantiago/bats_majorminor_warning_fix
BATS tests: more resilient remove_same_dev_warning
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/run_device_test.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/e2e/run_device_test.go b/test/e2e/run_device_test.go index a5e1e0269..b1a4c9cb2 100644 --- a/test/e2e/run_device_test.go +++ b/test/e2e/run_device_test.go @@ -75,11 +75,17 @@ var _ = Describe("Podman run device", func() { It("podman run device host device and container device parameter are directories", func() { SkipIfRootless() - SystemExec("mkdir", []string{"/dev/foodevdir"}) - SystemExec("mknod", []string{"/dev/foodevdir/null", "c", "1", "3"}) - session := podmanTest.Podman([]string{"run", "-q", "--device", "/dev/foodevdir:/dev/bar", ALPINE, "ls", "/dev/bar/null"}) + Expect(os.MkdirAll("/dev/foodevdir", os.ModePerm)).To(BeNil()) + defer os.RemoveAll("/dev/foodevdir") + + mknod := SystemExec("mknod", []string{"/dev/foodevdir/null", "c", "1", "3"}) + mknod.WaitWithDefaultTimeout() + Expect(mknod.ExitCode()).To(Equal(0)) + + session := podmanTest.Podman([]string{"run", "-q", "--device", "/dev/foodevdir:/dev/bar", ALPINE, "stat", "-c%t:%T", "/dev/bar/null"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(Equal("1:3")) }) It("podman run device host device with --privileged", func() { |