diff options
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/run_test.go | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 21c577d9a..a9b2a474f 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -185,6 +185,34 @@ var _ = Describe("Podman run", func() { Expect(session.OutputToString()).To(ContainSubstring("15")) }) + It("podman run device-read-bps test", func() { + session := podmanTest.Podman([]string{"run", "--rm", "--device-read-bps=/dev/zero:1mb", ALPINE, "cat", "/sys/fs/cgroup/blkio/blkio.throttle.read_bps_device"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(ContainSubstring("1048576")) + }) + + It("podman run device-write-bps test", func() { + session := podmanTest.Podman([]string{"run", "--rm", "--device-write-bps=/dev/zero:1mb", ALPINE, "cat", "/sys/fs/cgroup/blkio/blkio.throttle.write_bps_device"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(ContainSubstring("1048576")) + }) + + It("podman run device-read-iops test", func() { + session := podmanTest.Podman([]string{"run", "--rm", "--device-read-iops=/dev/zero:100", ALPINE, "cat", "/sys/fs/cgroup/blkio/blkio.throttle.read_iops_device"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(ContainSubstring("100")) + }) + + It("podman run device-write-iops test", func() { + session := podmanTest.Podman([]string{"run", "--rm", "--device-write-iops=/dev/zero:100", ALPINE, "cat", "/sys/fs/cgroup/blkio/blkio.throttle.write_iops_device"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(ContainSubstring("100")) + }) + It("podman run notify_socket", func() { sock := "/run/sock" os.Setenv("NOTIFY_SOCKET", sock) @@ -258,4 +286,18 @@ var _ = Describe("Podman run", func() { Expect(err).To(BeNil()) }) + It("podman run without group-add", func() { + session := podmanTest.Podman([]string{"run", "--rm", ALPINE, "id"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(Equal("uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)")) + }) + + It("podman run with group-add", func() { + session := podmanTest.Podman([]string{"run", "--rm", "--group-add=audio", "--group-add=nogroup", "--group-add=777", ALPINE, "id"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(Equal("uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),18(audio),20(dialout),26(tape),27(video),777,65533(nogroup)")) + }) + }) |