summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-04-03 13:37:25 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-06 00:09:46 +0000
commit998fd2ece0480e581e013124d0969a1af6305110 (patch)
tree84f3ae049fb1246a2f31c5eb5f55b40e6a17fc81 /test
parentc3e2b00333d42dc87a3385939715813006cc8af1 (diff)
downloadpodman-998fd2ece0480e581e013124d0969a1af6305110.tar.gz
podman-998fd2ece0480e581e013124d0969a1af6305110.tar.bz2
podman-998fd2ece0480e581e013124d0969a1af6305110.zip
Functionality changes to the following flags
--group-add --blkio-weight-device --device-read-bps --device-write-bps --device-read-iops --device-write-iops --group-add now supports group names as well as the gid associated with them. All the --device flags work now with moderate changes to the code to support both bps and iops. Added tests for all the flags. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #590 Approved by: mheon
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_test.go42
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)"))
+ })
+
})