diff --git a/test/e2e/checkpoint_image_test.go b/test/e2e/checkpoint_image_test.go index 6558d78c64..9096e041a7 100644 --- a/test/e2e/checkpoint_image_test.go +++ b/test/e2e/checkpoint_image_test.go @@ -65,7 +65,6 @@ var _ = Describe("Podman checkpoint", func() { localRunString := []string{ "run", - "-it", "-d", "--ip", GetRandomIPAddress(), "--name", containerName, diff --git a/test/e2e/commit_test.go b/test/e2e/commit_test.go index 9034b92993..b2b7e0a143 100644 --- a/test/e2e/commit_test.go +++ b/test/e2e/commit_test.go @@ -245,7 +245,7 @@ var _ = Describe("Podman commit", func() { }) It("podman commit container check env variables", func() { - s := podmanTest.Podman([]string{"run", "--name", "test1", "-e", "TEST=1=1-01=9.01", "-it", "alpine", "true"}) + s := podmanTest.Podman([]string{"run", "--name", "test1", "-e", "TEST=1=1-01=9.01", "alpine", "true"}) s.WaitWithDefaultTimeout() Expect(s).Should(Exit(0)) diff --git a/test/e2e/cp_test.go b/test/e2e/cp_test.go index 5d0b25c11d..af8e3c73a9 100644 --- a/test/e2e/cp_test.go +++ b/test/e2e/cp_test.go @@ -247,7 +247,7 @@ var _ = Describe("Podman cp", func() { Expect(session).Should(Exit(0)) // owner of the file copied to a container is the root user - session = podmanTest.Podman([]string{"exec", "-it", "testctr", "ls", "-l", "testfile2"}) + session = podmanTest.Podman([]string{"exec", "testctr", "ls", "-l", "testfile2"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring("root")) diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go index 8bbf4c51f9..2bad5ce096 100644 --- a/test/e2e/exec_test.go +++ b/test/e2e/exec_test.go @@ -467,7 +467,7 @@ var _ = Describe("Podman exec", func() { groupName := "group1" gid := "4444" ctrName1 := "ctr1" - ctr1 := podmanTest.Podman([]string{"run", "-ti", "--name", ctrName1, fedoraMinimal, "groupadd", "-g", gid, groupName}) + ctr1 := podmanTest.Podman([]string{"run", "--name", ctrName1, fedoraMinimal, "groupadd", "-g", gid, groupName}) ctr1.WaitWithDefaultTimeout() Expect(ctr1).Should(Exit(0)) @@ -481,7 +481,7 @@ var _ = Describe("Podman exec", func() { ctr2.WaitWithDefaultTimeout() Expect(ctr2).Should(Exit(0)) - exec := podmanTest.Podman([]string{"exec", "-ti", ctrName2, "id"}) + exec := podmanTest.Podman([]string{"exec", ctrName2, "id"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) Expect(exec.OutputToString()).To(ContainSubstring(fmt.Sprintf("%s(%s)", gid, groupName))) @@ -496,11 +496,11 @@ RUN useradd -u 1000 auser`, fedoraMinimal) podmanTest.BuildImage(dockerfile, imgName, "false") ctrName := "testctr" - ctr := podmanTest.Podman([]string{"run", "-t", "-i", "-d", "--name", ctrName, "--user", "auser:first", "--group-add", "second", imgName, "sleep", "300"}) + ctr := podmanTest.Podman([]string{"run", "-d", "--name", ctrName, "--user", "auser:first", "--group-add", "second", imgName, "sleep", "300"}) ctr.WaitWithDefaultTimeout() Expect(ctr).Should(Exit(0)) - exec := podmanTest.Podman([]string{"exec", "-t", ctrName, "id"}) + exec := podmanTest.Podman([]string{"exec", ctrName, "id"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) output := exec.OutputToString() @@ -516,11 +516,11 @@ RUN useradd -u 1000 auser`, fedoraMinimal) It("podman exec --detach", func() { ctrName := "testctr" - ctr := podmanTest.Podman([]string{"run", "-t", "-i", "-d", "--name", ctrName, ALPINE, "top"}) + ctr := podmanTest.Podman([]string{"run", "-d", "--name", ctrName, ALPINE, "top"}) ctr.WaitWithDefaultTimeout() Expect(ctr).Should(Exit(0)) - exec1 := podmanTest.Podman([]string{"exec", "-t", "-i", "-d", ctrName, "top"}) + exec1 := podmanTest.Podman([]string{"exec", "-d", ctrName, "top"}) exec1.WaitWithDefaultTimeout() Expect(ctr).Should(Exit(0)) @@ -529,7 +529,7 @@ RUN useradd -u 1000 auser`, fedoraMinimal) Expect(data[0].ExecIDs).To(HaveLen(1)) Expect(exec1.OutputToString()).To(ContainSubstring(data[0].ExecIDs[0])) - exec2 := podmanTest.Podman([]string{"exec", "-t", "-i", ctrName, "ps", "-a"}) + exec2 := podmanTest.Podman([]string{"exec", ctrName, "ps", "-a"}) exec2.WaitWithDefaultTimeout() Expect(ctr).Should(Exit(0)) Expect(strings.Count(exec2.OutputToString(), "top")).To(Equal(2)) @@ -551,7 +551,7 @@ RUN useradd -u 1000 auser`, fedoraMinimal) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - session = podmanTest.Podman([]string{"run", "-t", "-i", "-d", "--secret", "source=mysecret,type=env", "--name", "secr", ALPINE, "top"}) + session = podmanTest.Podman([]string{"run", "-d", "--secret", "source=mysecret,type=env", "--name", "secr", ALPINE, "top"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go index b1cd9782a6..3d71826e4a 100644 --- a/test/e2e/logs_test.go +++ b/test/e2e/logs_test.go @@ -287,7 +287,7 @@ var _ = Describe("Podman logs", func() { It("podman logs on a created container should result in 0 exit code: "+log, func() { skipIfJournaldInContainer() - session := podmanTest.Podman([]string{"create", "--log-driver", log, "-t", "--name", "log", ALPINE}) + session := podmanTest.Podman([]string{"create", "--log-driver", log, "--name", "log", ALPINE}) session.WaitWithDefaultTimeout() Expect(session).To(Exit(0)) @@ -382,7 +382,7 @@ var _ = Describe("Podman logs", func() { It("Make sure logs match expected length: "+log, func() { skipIfJournaldInContainer() - logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-t", "--name", "test", ALPINE, "sh", "-c", "echo 1; echo 2"}) + logc := podmanTest.Podman([]string{"run", "--log-driver", log, "--name", "test", ALPINE, "sh", "-c", "echo 1; echo 2"}) logc.WaitWithDefaultTimeout() Expect(logc).To(Exit(0)) @@ -395,8 +395,8 @@ var _ = Describe("Podman logs", func() { Expect(results).To(Exit(0)) outlines := results.OutputToStringArray() Expect(outlines).To(HaveLen(2)) - Expect(outlines[0]).To(Equal("1\r")) - Expect(outlines[1]).To(Equal("2\r")) + Expect(outlines[0]).To(Equal("1")) + Expect(outlines[1]).To(Equal("2")) }) It("podman logs test stdout and stderr: "+log, func() { diff --git a/test/e2e/network_connect_disconnect_test.go b/test/e2e/network_connect_disconnect_test.go index 6e6a7fb396..588cd7ce04 100644 --- a/test/e2e/network_connect_disconnect_test.go +++ b/test/e2e/network_connect_disconnect_test.go @@ -87,11 +87,11 @@ var _ = Describe("Podman network connect and disconnect", func() { ctr.WaitWithDefaultTimeout() Expect(ctr).Should(Exit(0)) - exec := podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth0"}) + exec := podmanTest.Podman([]string{"exec", "test", "ip", "addr", "show", "eth0"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) - exec2 := podmanTest.Podman([]string{"exec", "-it", "test", "cat", "/etc/resolv.conf"}) + exec2 := podmanTest.Podman([]string{"exec", "test", "cat", "/etc/resolv.conf"}) exec2.WaitWithDefaultTimeout() Expect(exec2).Should(Exit(0)) Expect(exec2.OutputToString()).To(ContainSubstring(ns)) @@ -106,11 +106,11 @@ var _ = Describe("Podman network connect and disconnect", func() { Expect(inspect).Should(Exit(0)) Expect(inspect.OutputToString()).To(Equal("0")) - exec = podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth0"}) + exec = podmanTest.Podman([]string{"exec", "test", "ip", "addr", "show", "eth0"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(ExitWithError()) - exec3 := podmanTest.Podman([]string{"exec", "-it", "test", "cat", "/etc/resolv.conf"}) + exec3 := podmanTest.Podman([]string{"exec", "test", "cat", "/etc/resolv.conf"}) exec3.WaitWithDefaultTimeout() Expect(exec3).Should(Exit(0)) Expect(exec3.OutputToString()).ToNot(ContainSubstring(ns)) @@ -201,7 +201,7 @@ var _ = Describe("Podman network connect and disconnect", func() { Expect(ctr).Should(Exit(0)) cid := ctr.OutputToString() - exec := podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth0"}) + exec := podmanTest.Podman([]string{"exec", "test", "ip", "addr", "show", "eth0"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) @@ -217,7 +217,7 @@ var _ = Describe("Podman network connect and disconnect", func() { Expect(gw).Should(Exit(0)) ns := gw.OutputToString() - exec2 := podmanTest.Podman([]string{"exec", "-it", "test", "cat", "/etc/resolv.conf"}) + exec2 := podmanTest.Podman([]string{"exec", "test", "cat", "/etc/resolv.conf"}) exec2.WaitWithDefaultTimeout() Expect(exec2).Should(Exit(0)) Expect(exec2.OutputToString()).ToNot(ContainSubstring(ns)) @@ -240,13 +240,13 @@ var _ = Describe("Podman network connect and disconnect", func() { Expect(inspect).Should(Exit(0)) Expect(inspect.OutputToString()).To(Equal("[" + cid[0:12] + "]")) - exec = podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth1"}) + exec = podmanTest.Podman([]string{"exec", "test", "ip", "addr", "show", "eth1"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) Expect(exec.OutputToString()).Should(ContainSubstring(ip)) Expect(exec.OutputToString()).Should(ContainSubstring(mac)) - exec3 := podmanTest.Podman([]string{"exec", "-it", "test", "cat", "/etc/resolv.conf"}) + exec3 := podmanTest.Podman([]string{"exec", "test", "cat", "/etc/resolv.conf"}) exec3.WaitWithDefaultTimeout() Expect(exec3).Should(Exit(0)) Expect(exec3.OutputToString()).To(ContainSubstring(ns)) @@ -293,11 +293,11 @@ var _ = Describe("Podman network connect and disconnect", func() { start.WaitWithDefaultTimeout() Expect(start).Should(Exit(0)) - exec := podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth0"}) + exec := podmanTest.Podman([]string{"exec", "test", "ip", "addr", "show", "eth0"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) - exec = podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth1"}) + exec = podmanTest.Podman([]string{"exec", "test", "ip", "addr", "show", "eth1"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) }) @@ -318,7 +318,7 @@ var _ = Describe("Podman network connect and disconnect", func() { ctr.WaitWithDefaultTimeout() Expect(ctr).Should(Exit(0)) - exec := podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth0"}) + exec := podmanTest.Podman([]string{"exec", "test", "ip", "addr", "show", "eth0"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) @@ -344,7 +344,7 @@ var _ = Describe("Podman network connect and disconnect", func() { Expect(inspect.OutputToString()).To(ContainSubstring(netName)) Expect(inspect.OutputToString()).To(ContainSubstring(newNetName)) - exec = podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth1"}) + exec = podmanTest.Podman([]string{"exec", "test", "ip", "addr", "show", "eth1"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) }) @@ -379,7 +379,7 @@ var _ = Describe("Podman network connect and disconnect", func() { start.WaitWithDefaultTimeout() Expect(start).Should(Exit(0)) - exec := podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth0"}) + exec := podmanTest.Podman([]string{"exec", "test", "ip", "addr", "show", "eth0"}) exec.WaitWithDefaultTimeout() // because the network interface order is not guaranteed to be the same we have to check both eth0 and eth1 @@ -389,7 +389,7 @@ var _ = Describe("Podman network connect and disconnect", func() { exitMatcher = Exit(0) } - exec = podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth1"}) + exec = podmanTest.Podman([]string{"exec", "test", "ip", "addr", "show", "eth1"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(exitMatcher) }) @@ -410,7 +410,7 @@ var _ = Describe("Podman network connect and disconnect", func() { ctr.WaitWithDefaultTimeout() Expect(ctr).Should(Exit(0)) - exec := podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth0"}) + exec := podmanTest.Podman([]string{"exec", "test", "ip", "addr", "show", "eth0"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) @@ -423,7 +423,7 @@ var _ = Describe("Podman network connect and disconnect", func() { Expect(inspect).Should(Exit(0)) Expect(inspect.OutputToString()).To(Equal("0")) - exec = podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth0"}) + exec = podmanTest.Podman([]string{"exec", "test", "ip", "addr", "show", "eth0"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(ExitWithError()) }) diff --git a/test/e2e/network_create_test.go b/test/e2e/network_create_test.go index 55041d5174..35bf0915bd 100644 --- a/test/e2e/network_create_test.go +++ b/test/e2e/network_create_test.go @@ -70,7 +70,7 @@ var _ = Describe("Podman network create", func() { // best we can defer removeNetworkDevice(result.NetworkInterface) - try := podmanTest.Podman([]string{"run", "-it", "--rm", "--network", netName, ALPINE, "sh", "-c", "ip addr show eth0 | awk ' /inet / {print $2}'"}) + try := podmanTest.Podman([]string{"run", "--rm", "--network", netName, ALPINE, "sh", "-c", "ip addr show eth0 | awk ' /inet / {print $2}'"}) try.WaitWithDefaultTimeout() Expect(try).To(Exit(0)) @@ -110,7 +110,7 @@ var _ = Describe("Podman network create", func() { // best we can defer removeNetworkDevice(result.NetworkInterface) - try := podmanTest.Podman([]string{"run", "-it", "--rm", "--network", netName, ALPINE, "sh", "-c", "ip addr show eth0 | grep global | awk ' /inet6 / {print $2}'"}) + try := podmanTest.Podman([]string{"run", "--rm", "--network", netName, ALPINE, "sh", "-c", "ip addr show eth0 | grep global | awk ' /inet6 / {print $2}'"}) try.WaitWithDefaultTimeout() Expect(try).To(Exit(0)) @@ -186,7 +186,7 @@ var _ = Describe("Podman network create", func() { Expect(subnet11.Contains(subnet21.IP)).To(BeFalse()) Expect(subnet12.Contains(subnet22.IP)).To(BeFalse()) - try := podmanTest.Podman([]string{"run", "-it", "--rm", "--network", netName, ALPINE, "sh", "-c", "ip addr show eth0 | grep global | awk ' /inet6 / {print $2}'"}) + try := podmanTest.Podman([]string{"run", "--rm", "--network", netName, ALPINE, "sh", "-c", "ip addr show eth0 | grep global | awk ' /inet6 / {print $2}'"}) try.WaitWithDefaultTimeout() _, subnet, err := net.ParseCIDR("fd00:4:3:2:1::/64") @@ -196,7 +196,7 @@ var _ = Describe("Podman network create", func() { // Ensure that the IP the container got is within the subnet the user asked for Expect(subnet.Contains(containerIP)).To(BeTrue()) // verify the container has an IPv4 address too (the IPv4 subnet is autogenerated) - try = podmanTest.Podman([]string{"run", "-it", "--rm", "--network", netName, ALPINE, "sh", "-c", "ip addr show eth0 | awk ' /inet / {print $2}'"}) + try = podmanTest.Podman([]string{"run", "--rm", "--network", netName, ALPINE, "sh", "-c", "ip addr show eth0 | awk ' /inet / {print $2}'"}) try.WaitWithDefaultTimeout() containerIP, _, err = net.ParseCIDR(try.OutputToString()) Expect(err).ToNot(HaveOccurred()) diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go index 2a16d8b451..dc2e07555f 100644 --- a/test/e2e/play_kube_test.go +++ b/test/e2e/play_kube_test.go @@ -1794,7 +1794,7 @@ func testPodWithSecret(podmanTest *PodmanTestIntegration, podYamlString, fileNam } Expect(kube).Should(Exit(0)) - exec := podmanTest.Podman([]string{"exec", "-it", "mypod-myctr", "cat", "/etc/foo/username"}) + exec := podmanTest.Podman([]string{"exec", "mypod-myctr", "cat", "/etc/foo/username"}) exec.WaitWithDefaultTimeout() if exists { Expect(exec).Should(Exit(0)) @@ -4783,19 +4783,19 @@ ENV OPENJ9_JAVA_OPTIONS=%q kube.WaitWithDefaultTimeout() Expect(kube).Should(Exit(0)) - exec := podmanTest.Podman([]string{"exec", "-it", "mypod2-myctr", "cat", "/etc/foo/username"}) + exec := podmanTest.Podman([]string{"exec", "mypod2-myctr", "cat", "/etc/foo/username"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) username, _ := base64.StdEncoding.DecodeString("dXNlcg==") Expect(exec.OutputToString()).Should(ContainSubstring(string(username))) - exec = podmanTest.Podman([]string{"exec", "-it", "mypod2-myctr", "cat", "/etc/bar/username"}) + exec = podmanTest.Podman([]string{"exec", "mypod2-myctr", "cat", "/etc/bar/username"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) username, _ = base64.StdEncoding.DecodeString("Y2RvZXJu") Expect(exec.OutputToString()).Should(ContainSubstring(string(username))) - exec = podmanTest.Podman([]string{"exec", "-it", "mypod2-myctr", "cat", "/etc/baz/plain_note"}) + exec = podmanTest.Podman([]string{"exec", "mypod2-myctr", "cat", "/etc/baz/plain_note"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) Expect(exec.OutputToString()).Should(ContainSubstring("This is a test")) @@ -4983,7 +4983,7 @@ spec: playKube.WaitWithDefaultTimeout() Expect(playKube).Should(Exit(0)) - exec := podmanTest.Podman([]string{"exec", "-it", "testpod-testctr", "cat", "/var/123.txt"}) + exec := podmanTest.Podman([]string{"exec", "testpod-testctr", "cat", "/var/123.txt"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) Expect(exec.OutputToString()).Should(Equal("hi")) @@ -5012,7 +5012,7 @@ spec: playKube := podmanTest.Podman([]string{"play", "kube", kubeYaml}) playKube.WaitWithDefaultTimeout() Expect(playKube).Should(Exit(0)) - exec := podmanTest.Podman([]string{"exec", "-it", "testpod-testctr", "ls", "/var"}) + exec := podmanTest.Podman([]string{"exec", "testpod-testctr", "ls", "/var"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) Expect(exec.OutputToString()).Should(ContainSubstring("123.txt")) @@ -5095,7 +5095,7 @@ spec: kube.WaitWithDefaultTimeout() Expect(kube).Should(Exit(0), string(out)) - exec := podmanTest.Podman([]string{"exec", "-it", "testpod-testctr", "ls", "/etc/"}) + exec := podmanTest.Podman([]string{"exec", "testpod-testctr", "ls", "/etc/"}) exec.WaitWithDefaultTimeout() Expect(exec).Should(Exit(0)) Expect(exec.OutputToString()).ShouldNot(HaveLen(3)) diff --git a/test/e2e/pod_clone_test.go b/test/e2e/pod_clone_test.go index 9c7abe7a87..a348b4c5f1 100644 --- a/test/e2e/pod_clone_test.go +++ b/test/e2e/pod_clone_test.go @@ -148,7 +148,7 @@ var _ = Describe("Podman pod clone", func() { podClone.WaitWithDefaultTimeout() Expect(podClone).Should(Exit(0)) - run := podmanTest.Podman([]string{"run", "-it", "--pod", podClone.OutputToString(), ALPINE, "mount"}) + run := podmanTest.Podman([]string{"run", "--pod", podClone.OutputToString(), ALPINE, "mount"}) run.WaitWithDefaultTimeout() Expect(run).Should(Exit(0)) t, strings := run.GrepString("shm on /dev/shm type tmpfs") @@ -167,7 +167,7 @@ var _ = Describe("Podman pod clone", func() { session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - session = podmanTest.Podman([]string{"run", "-it", "--pod", session.OutputToString(), ALPINE, "printenv", "HOSTNAME"}) + session = podmanTest.Podman([]string{"run", "--pod", session.OutputToString(), ALPINE, "printenv", "HOSTNAME"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring(hostname)) diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go index f6f10be787..008eb3543f 100644 --- a/test/e2e/pod_create_test.go +++ b/test/e2e/pod_create_test.go @@ -132,11 +132,11 @@ var _ = Describe("Podman pod create", func() { podCreate.WaitWithDefaultTimeout() Expect(podCreate).Should(Exit(0)) - alpineResolvConf := podmanTest.Podman([]string{"run", "-ti", "--rm", "--no-hosts", ALPINE, "cat", "/etc/hosts"}) + alpineResolvConf := podmanTest.Podman([]string{"run", "--rm", "--no-hosts", ALPINE, "cat", "/etc/hosts"}) alpineResolvConf.WaitWithDefaultTimeout() Expect(alpineResolvConf).Should(Exit(0)) - podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "-ti", "--rm", ALPINE, "cat", "/etc/hosts"}) + podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "--rm", ALPINE, "cat", "/etc/hosts"}) podResolvConf.WaitWithDefaultTimeout() Expect(podResolvConf).Should(Exit(0)) Expect(podResolvConf.OutputToString()).To(Equal(alpineResolvConf.OutputToString())) @@ -155,7 +155,7 @@ var _ = Describe("Podman pod create", func() { podCreate.WaitWithDefaultTimeout() Expect(podCreate).Should(Exit(0)) - podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "-ti", "--rm", ALPINE, "cat", "/etc/hosts"}) + podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "--rm", ALPINE, "cat", "/etc/hosts"}) podResolvConf.WaitWithDefaultTimeout() Expect(podResolvConf).Should(Exit(0)) Expect(podResolvConf.OutputToString()).To(ContainSubstring("12.34.56.78 test.example.com")) @@ -175,7 +175,7 @@ var _ = Describe("Podman pod create", func() { podCreate.WaitWithDefaultTimeout() Expect(podCreate).Should(Exit(0)) - podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "-ti", "--rm", ALPINE, "cat", "/etc/resolv.conf"}) + podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "--rm", ALPINE, "cat", "/etc/resolv.conf"}) podResolvConf.WaitWithDefaultTimeout() Expect(podResolvConf).Should(Exit(0)) Expect(podResolvConf.OutputToString()).To(ContainSubstring("nameserver %s", server)) @@ -196,7 +196,7 @@ var _ = Describe("Podman pod create", func() { podCreate.WaitWithDefaultTimeout() Expect(podCreate).Should(Exit(0)) - podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "-ti", "--rm", ALPINE, "cat", "/etc/resolv.conf"}) + podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "--rm", ALPINE, "cat", "/etc/resolv.conf"}) podResolvConf.WaitWithDefaultTimeout() Expect(podResolvConf).Should(Exit(0)) Expect(podResolvConf.OutputToString()).To(ContainSubstring(fmt.Sprintf("options %s", option))) @@ -217,7 +217,7 @@ var _ = Describe("Podman pod create", func() { podCreate.WaitWithDefaultTimeout() Expect(podCreate).Should(Exit(0)) - podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "-ti", "--rm", ALPINE, "cat", "/etc/resolv.conf"}) + podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "--rm", ALPINE, "cat", "/etc/resolv.conf"}) podResolvConf.WaitWithDefaultTimeout() Expect(podResolvConf).Should(Exit(0)) Expect(podResolvConf.OutputToString()).To(ContainSubstring(fmt.Sprintf("search %s", search))) @@ -241,7 +241,7 @@ var _ = Describe("Podman pod create", func() { Expect(podCreate).Should(Exit(125)) } else { Expect(podCreate).Should(Exit(0)) - podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "-ti", "--rm", ALPINE, "ip", "addr"}) + podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "--rm", ALPINE, "ip", "addr"}) podResolvConf.WaitWithDefaultTimeout() Expect(podResolvConf).Should(Exit(0)) Expect(podResolvConf.OutputToString()).To(ContainSubstring(ip)) @@ -284,7 +284,7 @@ var _ = Describe("Podman pod create", func() { Expect(podCreate).Should(Exit(125)) } else { Expect(podCreate).Should(Exit(0)) - podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "-ti", "--rm", ALPINE, "ip", "addr"}) + podResolvConf := podmanTest.Podman([]string{"run", "--pod", name, "--rm", ALPINE, "ip", "addr"}) podResolvConf.WaitWithDefaultTimeout() Expect(podResolvConf).Should(Exit(0)) Expect(podResolvConf.OutputToString()).To(ContainSubstring(mac)) @@ -985,7 +985,7 @@ ENTRYPOINT ["sleep","99999"] podCreate.WaitWithDefaultTimeout() Expect(podCreate).Should(Exit(0)) - ctrCreate = podmanTest.Podman([]string{"container", "run", "-it", "--pod", podCreate.OutputToString(), ALPINE, "cat", "/proc/self/attr/current"}) + ctrCreate = podmanTest.Podman([]string{"container", "run", "--pod", podCreate.OutputToString(), ALPINE, "cat", "/proc/self/attr/current"}) ctrCreate.WaitWithDefaultTimeout() Expect(ctrCreate).Should(Exit(0)) match, _ := ctrCreate.GrepString("spc_t") @@ -1134,7 +1134,7 @@ ENTRYPOINT ["sleep","99999"] podCreate.WaitWithDefaultTimeout() Expect(podCreate).Should(Exit(0)) - run := podmanTest.Podman([]string{"run", "-it", "--pod", podCreate.OutputToString(), ALPINE, "mount"}) + run := podmanTest.Podman([]string{"run", "--pod", podCreate.OutputToString(), ALPINE, "mount"}) run.WaitWithDefaultTimeout() Expect(run).Should(Exit(0)) t, strings := run.GrepString("shm on /dev/shm type tmpfs") @@ -1157,7 +1157,7 @@ ENTRYPOINT ["sleep","99999"] session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - session = podmanTest.Podman([]string{"run", "-it", "--pod", session.OutputToString(), ALPINE, "printenv", "HOSTNAME"}) + session = podmanTest.Podman([]string{"run", "--pod", session.OutputToString(), ALPINE, "printenv", "HOSTNAME"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring(hostname)) diff --git a/test/e2e/pod_initcontainers_test.go b/test/e2e/pod_initcontainers_test.go index ec429f5684..04a17fdeee 100644 --- a/test/e2e/pod_initcontainers_test.go +++ b/test/e2e/pod_initcontainers_test.go @@ -91,7 +91,7 @@ var _ = Describe("Podman init containers", func() { start := podmanTest.Podman([]string{"pod", "start", "foobar"}) start.WaitWithDefaultTimeout() Expect(start).Should(Exit(0)) - checkLog := podmanTest.Podman([]string{"exec", "-it", verify.OutputToString(), "cat", filename}) + checkLog := podmanTest.Podman([]string{"exec", verify.OutputToString(), "cat", filename}) checkLog.WaitWithDefaultTimeout() Expect(checkLog).Should(Exit(0)) Expect(checkLog.OutputToString()).To(Equal(content)) @@ -124,7 +124,7 @@ var _ = Describe("Podman init containers", func() { Expect(startPod).Should(Exit(0)) // Because no init was run, the file should not even exist - doubleCheck := podmanTest.Podman([]string{"exec", "-it", verify.OutputToString(), "cat", filename}) + doubleCheck := podmanTest.Podman([]string{"exec", verify.OutputToString(), "cat", filename}) doubleCheck.WaitWithDefaultTimeout() Expect(doubleCheck).Should(Exit(1)) @@ -145,7 +145,7 @@ var _ = Describe("Podman init containers", func() { Expect(start).Should(Exit(0)) // capture the date written - checkLog := podmanTest.Podman([]string{"exec", "-it", verify.OutputToString(), "cat", filename}) + checkLog := podmanTest.Podman([]string{"exec", verify.OutputToString(), "cat", filename}) checkLog.WaitWithDefaultTimeout() firstResult := checkLog.OutputToString() Expect(checkLog).Should(Exit(0)) @@ -159,7 +159,7 @@ var _ = Describe("Podman init containers", func() { Expect(startPod).Should(Exit(0)) // Check the file again with exec - secondCheckLog := podmanTest.Podman([]string{"exec", "-it", verify.OutputToString(), "cat", filename}) + secondCheckLog := podmanTest.Podman([]string{"exec", verify.OutputToString(), "cat", filename}) secondCheckLog.WaitWithDefaultTimeout() Expect(secondCheckLog).Should(Exit(0)) diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go index 42146b99b0..e661c08095 100644 --- a/test/e2e/ps_test.go +++ b/test/e2e/ps_test.go @@ -375,7 +375,7 @@ var _ = Describe("Podman ps", func() { }) It("podman ps filter by exited does not need all", func() { - ctr := podmanTest.Podman([]string{"run", "-t", "-i", ALPINE, "ls", "/"}) + ctr := podmanTest.Podman([]string{"run", ALPINE, "ls", "/"}) ctr.WaitWithDefaultTimeout() Expect(ctr).Should(Exit(0)) @@ -392,7 +392,7 @@ var _ = Describe("Podman ps", func() { It("podman filter without status does not find non-running", func() { ctrName := "aContainerName" - ctr := podmanTest.Podman([]string{"create", "--name", ctrName, "-t", "-i", ALPINE, "ls", "/"}) + ctr := podmanTest.Podman([]string{"create", "--name", ctrName, ALPINE, "ls", "/"}) ctr.WaitWithDefaultTimeout() Expect(ctr).Should(Exit(0)) @@ -420,7 +420,7 @@ var _ = Describe("Podman ps", func() { session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - session = podmanTest.Podman([]string{"create", "-t", ALPINE, "top"}) + session = podmanTest.Podman([]string{"create", ALPINE, "top"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) @@ -435,7 +435,7 @@ var _ = Describe("Podman ps", func() { session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - session = podmanTest.Podman([]string{"create", "-t", ALPINE, "top"}) + session = podmanTest.Podman([]string{"create", ALPINE, "top"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) diff --git a/test/e2e/run_dns_test.go b/test/e2e/run_dns_test.go index 61177b4c70..4ad3e68abb 100644 --- a/test/e2e/run_dns_test.go +++ b/test/e2e/run_dns_test.go @@ -93,7 +93,7 @@ var _ = Describe("Podman run dns", func() { }) It("podman run add hostname sets /etc/hosts", func() { - session := podmanTest.Podman([]string{"run", "-t", "-i", "--hostname=foobar", ALPINE, "cat", "/etc/hosts"}) + session := podmanTest.Podman([]string{"run", "--hostname=foobar", ALPINE, "cat", "/etc/hosts"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring("foobar")) diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go index 0cfa90a2c5..80ce7fc327 100644 --- a/test/e2e/run_networking_test.go +++ b/test/e2e/run_networking_test.go @@ -68,7 +68,7 @@ var _ = Describe("Podman run networking", func() { session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - session = podmanTest.Podman([]string{"exec", "-i", "con1", "nslookup", "google.com", aardvarkDNSGateway}) + session = podmanTest.Podman([]string{"exec", "con1", "nslookup", "google.com", aardvarkDNSGateway}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring("Non-authoritative answer: Name: google.com Address:")) @@ -83,7 +83,7 @@ var _ = Describe("Podman run networking", func() { session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - session = podmanTest.Podman([]string{"exec", "-i", "con1", "nslookup", "google.com", aardvarkDNSGateway}) + session = podmanTest.Podman([]string{"exec", "con1", "nslookup", "google.com", aardvarkDNSGateway}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(1)) Expect(session.OutputToString()).To(ContainSubstring(";; connection timed out; no servers could be reached")) @@ -721,12 +721,12 @@ EXPOSE 2004-2005/tcp`, ALPINE) ctr2.WaitWithDefaultTimeout() Expect(ctr2).Should(Exit(0)) - exec3 := podmanTest.Podman([]string{"exec", "-i", ctrName2, "cat", "/etc/resolv.conf"}) + exec3 := podmanTest.Podman([]string{"exec", ctrName2, "cat", "/etc/resolv.conf"}) exec3.WaitWithDefaultTimeout() Expect(exec3).Should(Exit(0)) Expect(exec3.OutputToString()).To(ContainSubstring("nameserver 192.0.2.1")) - exec4 := podmanTest.Podman([]string{"exec", "-i", ctrName2, "cat", "/etc/hosts"}) + exec4 := podmanTest.Podman([]string{"exec", ctrName2, "cat", "/etc/hosts"}) exec4.WaitWithDefaultTimeout() Expect(exec4).Should(Exit(0)) Expect(exec4.OutputToString()).To(ContainSubstring("192.0.2.2 test1")) @@ -958,7 +958,7 @@ EXPOSE 2004-2005/tcp`, ALPINE) Expect(create).Should(Exit(0)) defer podmanTest.removeNetwork(netName) - run := podmanTest.Podman([]string{"run", "-t", "-i", "--rm", "--net", netName, "--ip", ipAddr, ALPINE, "ip", "addr"}) + run := podmanTest.Podman([]string{"run", "--rm", "--net", netName, "--ip", ipAddr, ALPINE, "ip", "addr"}) run.WaitWithDefaultTimeout() Expect(run).Should(Exit(0)) Expect(run.OutputToString()).To(ContainSubstring(ipAddr)) @@ -998,7 +998,7 @@ EXPOSE 2004-2005/tcp`, ALPINE) Expect(create).Should(Exit(0)) defer podmanTest.removeNetwork(netName) - run := podmanTest.Podman([]string{"run", "-t", "-i", "--rm", "--pod", "new:" + podname, "--net", netName, "--ip", ipAddr, ALPINE, "ip", "addr"}) + run := podmanTest.Podman([]string{"run", "--rm", "--pod", "new:" + podname, "--net", netName, "--ip", ipAddr, ALPINE, "ip", "addr"}) run.WaitWithDefaultTimeout() Expect(run).Should(Exit(0)) Expect(run.OutputToString()).To(ContainSubstring(ipAddr)) diff --git a/test/e2e/run_privileged_test.go b/test/e2e/run_privileged_test.go index ac2785c3ed..519ebf6636 100644 --- a/test/e2e/run_privileged_test.go +++ b/test/e2e/run_privileged_test.go @@ -140,7 +140,7 @@ var _ = Describe("Podman privileged container tests", func() { mknod.WaitWithDefaultTimeout() Expect(mknod).Should(Exit(0)) - session := podmanTest.Podman([]string{"run", "--name=" + containerName, "--privileged", "-it", fedoraMinimal, "ls", "/dev"}) + session := podmanTest.Podman([]string{"run", "--name=" + containerName, "--privileged", fedoraMinimal, "ls", "/dev"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) diff --git a/test/e2e/run_selinux_test.go b/test/e2e/run_selinux_test.go index 1275f2d6fa..9beb1bae61 100644 --- a/test/e2e/run_selinux_test.go +++ b/test/e2e/run_selinux_test.go @@ -45,21 +45,21 @@ var _ = Describe("Podman run", func() { }) It("podman run selinux grep test", func() { - session := podmanTest.Podman([]string{"run", "-it", "--security-opt", "label=level:s0:c1,c2", ALPINE, "cat", "/proc/self/attr/current"}) + session := podmanTest.Podman([]string{"run", "--security-opt", "label=level:s0:c1,c2", ALPINE, "cat", "/proc/self/attr/current"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring("s0:c1,c2")) }) It("podman run selinux disable test", func() { - session := podmanTest.Podman([]string{"run", "-it", "--security-opt", "label=disable", ALPINE, "cat", "/proc/self/attr/current"}) + session := podmanTest.Podman([]string{"run", "--security-opt", "label=disable", ALPINE, "cat", "/proc/self/attr/current"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring("spc_t")) }) It("podman run selinux type check test", func() { - session := podmanTest.Podman([]string{"run", "-it", ALPINE, "cat", "/proc/self/attr/current"}) + session := podmanTest.Podman([]string{"run", ALPINE, "cat", "/proc/self/attr/current"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) match1, _ := session.GrepString("container_t") @@ -68,7 +68,7 @@ var _ = Describe("Podman run", func() { }) It("podman run selinux type setup test", func() { - session := podmanTest.Podman([]string{"run", "-it", "--security-opt", "label=type:spc_t", ALPINE, "cat", "/proc/self/attr/current"}) + session := podmanTest.Podman([]string{"run", "--security-opt", "label=type:spc_t", ALPINE, "cat", "/proc/self/attr/current"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring("spc_t")) @@ -138,12 +138,12 @@ var _ = Describe("Podman run", func() { }) It("podman run selinux file type setup test", func() { - session := podmanTest.Podman([]string{"run", "-it", "--security-opt", "label=type:spc_t", "--security-opt", "label=filetype:container_var_lib_t", fedoraMinimal, "ls", "-Z", "/dev"}) + session := podmanTest.Podman([]string{"run", "--security-opt", "label=type:spc_t", "--security-opt", "label=filetype:container_var_lib_t", fedoraMinimal, "ls", "-Z", "/dev"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring("container_var_lib_t")) - session = podmanTest.Podman([]string{"run", "-it", "--security-opt", "label=type:spc_t", "--security-opt", "label=filetype:foobar", fedoraMinimal, "ls", "-Z", "/dev"}) + session = podmanTest.Podman([]string{"run", "--security-opt", "label=type:spc_t", "--security-opt", "label=filetype:foobar", fedoraMinimal, "ls", "-Z", "/dev"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(126)) }) @@ -161,7 +161,7 @@ var _ = Describe("Podman run", func() { }) It("podman run --privileged and --security-opt SELinux options", func() { - session := podmanTest.Podman([]string{"run", "-it", "--privileged", "--security-opt", "label=type:spc_t", "--security-opt", "label=level:s0:c1,c2", ALPINE, "cat", "/proc/self/attr/current"}) + session := podmanTest.Podman([]string{"run", "--privileged", "--security-opt", "label=type:spc_t", "--security-opt", "label=level:s0:c1,c2", ALPINE, "cat", "/proc/self/attr/current"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring("spc_t")) diff --git a/test/e2e/run_signal_test.go b/test/e2e/run_signal_test.go index 3a6f346dff..4272b0f6c0 100644 --- a/test/e2e/run_signal_test.go +++ b/test/e2e/run_signal_test.go @@ -58,7 +58,7 @@ var _ = Describe("Podman run with --sig-proxy", func() { err = podmanTest.RestoreArtifact(fedoraMinimal) Expect(err).ToNot(HaveOccurred()) } - _, pid := podmanTest.PodmanPID([]string{"run", "-it", "-v", fmt.Sprintf("%s:/h:Z", udsDir), fedoraMinimal, "bash", "-c", sigCatch}) + _, pid := podmanTest.PodmanPID([]string{"run", "-v", fmt.Sprintf("%s:/h:Z", udsDir), fedoraMinimal, "bash", "-c", sigCatch}) uds, _ := os.OpenFile(udsPath, os.O_RDONLY|syscall.O_NONBLOCK, 0600) defer uds.Close() diff --git a/test/e2e/run_staticip_test.go b/test/e2e/run_staticip_test.go index 559dcfd93f..6e317e4a1d 100644 --- a/test/e2e/run_staticip_test.go +++ b/test/e2e/run_staticip_test.go @@ -40,26 +40,26 @@ var _ = Describe("Podman run with --ip flag", func() { }) It("Podman run --ip with garbage address", func() { - result := podmanTest.Podman([]string{"run", "-ti", "--ip", "114232346", ALPINE, "ls"}) + result := podmanTest.Podman([]string{"run", "--ip", "114232346", ALPINE, "ls"}) result.WaitWithDefaultTimeout() Expect(result).To(ExitWithError()) }) It("Podman run --ip with v6 address", func() { - result := podmanTest.Podman([]string{"run", "-ti", "--ip", "2001:db8:bad:beef::1", ALPINE, "ls"}) + result := podmanTest.Podman([]string{"run", "--ip", "2001:db8:bad:beef::1", ALPINE, "ls"}) result.WaitWithDefaultTimeout() Expect(result).To(ExitWithError()) }) It("Podman run --ip with non-allocatable IP", func() { - result := podmanTest.Podman([]string{"run", "-ti", "--ip", "203.0.113.124", ALPINE, "ls"}) + result := podmanTest.Podman([]string{"run", "--ip", "203.0.113.124", ALPINE, "ls"}) result.WaitWithDefaultTimeout() Expect(result).To(ExitWithError()) }) It("Podman run with specified static IP has correct IP", func() { ip := GetRandomIPAddress() - result := podmanTest.Podman([]string{"run", "-ti", "--ip", ip, ALPINE, "ip", "addr"}) + result := podmanTest.Podman([]string{"run", "--ip", ip, ALPINE, "ip", "addr"}) result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) Expect(result.OutputToString()).To(ContainSubstring(ip + "/16")) @@ -73,7 +73,7 @@ var _ = Describe("Podman run with --ip flag", func() { defer podmanTest.removeNetwork(netName) Expect(net).To(Exit(0)) - result := podmanTest.Podman([]string{"run", "-ti", "--network", netName, "--ip6", ipv6, ALPINE, "ip", "addr"}) + result := podmanTest.Podman([]string{"run", "--network", netName, "--ip6", ipv6, ALPINE, "ip", "addr"}) result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) Expect(result.OutputToString()).To(ContainSubstring(ipv6 + "/64")) @@ -81,7 +81,7 @@ var _ = Describe("Podman run with --ip flag", func() { It("Podman run with --network bridge:ip=", func() { ip := GetRandomIPAddress() - result := podmanTest.Podman([]string{"run", "-ti", "--network", "bridge:ip=" + ip, ALPINE, "ip", "addr"}) + result := podmanTest.Podman([]string{"run", "--network", "bridge:ip=" + ip, ALPINE, "ip", "addr"}) result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) Expect(result.OutputToString()).To(ContainSubstring(ip + "/16")) @@ -91,7 +91,7 @@ var _ = Describe("Podman run with --ip flag", func() { ip := GetRandomIPAddress() mac := "44:33:22:11:00:99" intName := "myeth" - result := podmanTest.Podman([]string{"run", "-ti", "--network", "bridge:ip=" + ip + ",mac=" + mac + ",interface_name=" + intName, ALPINE, "ip", "addr"}) + result := podmanTest.Podman([]string{"run", "--network", "bridge:ip=" + ip + ",mac=" + mac + ",interface_name=" + intName, ALPINE, "ip", "addr"}) result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) Expect(result.OutputToString()).To(ContainSubstring(ip + "/16")) diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 506dc37042..465cbaee7e 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -182,7 +182,7 @@ var _ = Describe("Podman run", func() { It("podman create pod with name in /etc/hosts", func() { name := "test_container" hostname := "test_hostname" - session := podmanTest.Podman([]string{"run", "-ti", "--rm", "--name", name, "--hostname", hostname, ALPINE, "cat", "/etc/hosts"}) + session := podmanTest.Podman([]string{"run", "--rm", "--name", name, "--hostname", hostname, ALPINE, "cat", "/etc/hosts"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring(name)) @@ -440,28 +440,28 @@ var _ = Describe("Podman run", func() { }) It("podman run seccomp test", func() { - session := podmanTest.Podman([]string{"run", "-it", "--security-opt", strings.Join([]string{"seccomp=", forbidGetCWDSeccompProfile()}, ""), ALPINE, "pwd"}) + session := podmanTest.Podman([]string{"run", "--security-opt", strings.Join([]string{"seccomp=", forbidGetCWDSeccompProfile()}, ""), ALPINE, "pwd"}) session.WaitWithDefaultTimeout() Expect(session).To(ExitWithError()) - Expect(session.OutputToString()).To(ContainSubstring("Operation not permitted")) + Expect(session.ErrorToString()).To(ContainSubstring("Operation not permitted")) }) It("podman run seccomp test --privileged", func() { - session := podmanTest.Podman([]string{"run", "-it", "--privileged", "--security-opt", strings.Join([]string{"seccomp=", forbidGetCWDSeccompProfile()}, ""), ALPINE, "pwd"}) + session := podmanTest.Podman([]string{"run", "--privileged", "--security-opt", strings.Join([]string{"seccomp=", forbidGetCWDSeccompProfile()}, ""), ALPINE, "pwd"}) session.WaitWithDefaultTimeout() Expect(session).To(ExitWithError()) - Expect(session.OutputToString()).To(ContainSubstring("Operation not permitted")) + Expect(session.ErrorToString()).To(ContainSubstring("Operation not permitted")) }) It("podman run seccomp test --privileged no profile should be unconfined", func() { - session := podmanTest.Podman([]string{"run", "-it", "--privileged", ALPINE, "grep", "Seccomp", "/proc/self/status"}) + session := podmanTest.Podman([]string{"run", "--privileged", ALPINE, "grep", "Seccomp", "/proc/self/status"}) session.WaitWithDefaultTimeout() Expect(session.OutputToString()).To(ContainSubstring("0")) Expect(session).Should(Exit(0)) }) It("podman run seccomp test no profile should be default", func() { - session := podmanTest.Podman([]string{"run", "-it", ALPINE, "grep", "Seccomp", "/proc/self/status"}) + session := podmanTest.Podman([]string{"run", ALPINE, "grep", "Seccomp", "/proc/self/status"}) session.WaitWithDefaultTimeout() Expect(session.OutputToString()).To(ContainSubstring("2")) Expect(session).Should(Exit(0)) @@ -1589,7 +1589,7 @@ USER mail`, BB) It("podman run --privileged and --group-add", func() { groupName := "mail" - session := podmanTest.Podman([]string{"run", "-t", "-i", "--group-add", groupName, "--privileged", fedoraMinimal, "groups"}) + session := podmanTest.Podman([]string{"run", "--group-add", groupName, "--privileged", fedoraMinimal, "groups"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring(groupName)) diff --git a/test/e2e/run_userns_test.go b/test/e2e/run_userns_test.go index 38111896be..72c884263d 100644 --- a/test/e2e/run_userns_test.go +++ b/test/e2e/run_userns_test.go @@ -95,7 +95,7 @@ var _ = Describe("Podman UserNS support", func() { // https://github.com/containers/podman/pull/1066#issuecomment-403562116 // To avoid a potential future regression, use this as a test. It("podman uidmapping and gidmapping with short-opts", func() { - session := podmanTest.Podman([]string{"run", "--uidmap=0:1:5000", "--gidmap=0:200:5000", "-it", "alpine", "echo", "hello"}) + session := podmanTest.Podman([]string{"run", "--uidmap=0:1:5000", "--gidmap=0:200:5000", "alpine", "echo", "hello"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(ContainSubstring("hello")) @@ -179,12 +179,12 @@ var _ = Describe("Podman UserNS support", func() { session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - exec1 := podmanTest.Podman([]string{"exec", "-t", "-i", ctrName, "cat", "/etc/passwd"}) + exec1 := podmanTest.Podman([]string{"exec", ctrName, "cat", "/etc/passwd"}) exec1.WaitWithDefaultTimeout() Expect(exec1).Should(Exit(0)) Expect(exec1.OutputToString()).To(ContainSubstring(userName)) - exec2 := podmanTest.Podman([]string{"exec", "-t", "-i", ctrName, "useradd", "testuser"}) + exec2 := podmanTest.Podman([]string{"exec", ctrName, "useradd", "testuser"}) exec2.WaitWithDefaultTimeout() Expect(exec2).Should(Exit(0)) }) diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go index 946ac4c494..9e7e08038c 100644 --- a/test/e2e/run_volume_test.go +++ b/test/e2e/run_volume_test.go @@ -432,12 +432,12 @@ var _ = Describe("Podman run with volumes", func() { }) It("podman named volume copyup", func() { - baselineSession := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", ALPINE, "ls", "/etc/apk/"}) + baselineSession := podmanTest.Podman([]string{"run", "--rm", ALPINE, "ls", "/etc/apk/"}) baselineSession.WaitWithDefaultTimeout() Expect(baselineSession).Should(Exit(0)) baselineOutput := baselineSession.OutputToString() - inlineVolumeSession := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", "-v", "testvol1:/etc/apk", ALPINE, "ls", "/etc/apk/"}) + inlineVolumeSession := podmanTest.Podman([]string{"run", "--rm", "-v", "testvol1:/etc/apk", ALPINE, "ls", "/etc/apk/"}) inlineVolumeSession.WaitWithDefaultTimeout() Expect(inlineVolumeSession).Should(Exit(0)) Expect(inlineVolumeSession.OutputToString()).To(Equal(baselineOutput)) @@ -446,7 +446,7 @@ var _ = Describe("Podman run with volumes", func() { makeVolumeSession.WaitWithDefaultTimeout() Expect(makeVolumeSession).Should(Exit(0)) - separateVolumeSession := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", "-v", "testvol2:/etc/apk", ALPINE, "ls", "/etc/apk/"}) + separateVolumeSession := podmanTest.Podman([]string{"run", "--rm", "-v", "testvol2:/etc/apk", ALPINE, "ls", "/etc/apk/"}) separateVolumeSession.WaitWithDefaultTimeout() Expect(separateVolumeSession).Should(Exit(0)) Expect(separateVolumeSession.OutputToString()).To(Equal(baselineOutput)) @@ -467,47 +467,47 @@ RUN touch /testfile RUN sh -c "cd /etc/apk && ln -s ../../testfile"`, ALPINE) podmanTest.BuildImage(dockerfile, imgName, "false") - baselineSession := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", imgName, "ls", "/etc/apk/"}) + baselineSession := podmanTest.Podman([]string{"run", "--rm", imgName, "ls", "/etc/apk/"}) baselineSession.WaitWithDefaultTimeout() Expect(baselineSession).Should(Exit(0)) baselineOutput := baselineSession.OutputToString() - outputSession := podmanTest.Podman([]string{"run", "-t", "-i", "-v", "/etc/apk/", imgName, "ls", "/etc/apk/"}) + outputSession := podmanTest.Podman([]string{"run", "-v", "/etc/apk/", imgName, "ls", "/etc/apk/"}) outputSession.WaitWithDefaultTimeout() Expect(outputSession).Should(Exit(0)) Expect(outputSession.OutputToString()).To(Equal(baselineOutput)) }) It("podman named volume copyup empty directory", func() { - baselineSession := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", ALPINE, "ls", "/srv"}) + baselineSession := podmanTest.Podman([]string{"run", "--rm", ALPINE, "ls", "/srv"}) baselineSession.WaitWithDefaultTimeout() Expect(baselineSession).Should(Exit(0)) baselineOutput := baselineSession.OutputToString() - outputSession := podmanTest.Podman([]string{"run", "-t", "-i", "-v", "/srv", ALPINE, "ls", "/srv"}) + outputSession := podmanTest.Podman([]string{"run", "-v", "/srv", ALPINE, "ls", "/srv"}) outputSession.WaitWithDefaultTimeout() Expect(outputSession).Should(Exit(0)) Expect(outputSession.OutputToString()).To(Equal(baselineOutput)) }) It("podman named volume copyup of /var", func() { - baselineSession := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", fedoraMinimal, "ls", "/var"}) + baselineSession := podmanTest.Podman([]string{"run", "--rm", fedoraMinimal, "ls", "/var"}) baselineSession.WaitWithDefaultTimeout() Expect(baselineSession).Should(Exit(0)) baselineOutput := baselineSession.OutputToString() - outputSession := podmanTest.Podman([]string{"run", "-t", "-i", "-v", "/var", fedoraMinimal, "ls", "/var"}) + outputSession := podmanTest.Podman([]string{"run", "-v", "/var", fedoraMinimal, "ls", "/var"}) outputSession.WaitWithDefaultTimeout() Expect(outputSession).Should(Exit(0)) Expect(outputSession.OutputToString()).To(Equal(baselineOutput)) }) It("podman read-only tmpfs conflict with volume", func() { - session := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", "--read-only", "-v", "tmp_volume:" + dest, ALPINE, "touch", dest + "/a"}) + session := podmanTest.Podman([]string{"run", "--rm", "--read-only", "-v", "tmp_volume:" + dest, ALPINE, "touch", dest + "/a"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - session2 := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", "--read-only", "--tmpfs", dest, ALPINE, "touch", dest + "/a"}) + session2 := podmanTest.Podman([]string{"run", "--rm", "--read-only", "--tmpfs", dest, ALPINE, "touch", dest + "/a"}) session2.WaitWithDefaultTimeout() Expect(session2).Should(Exit(0)) }) @@ -623,7 +623,7 @@ RUN sh -c "cd /etc/apk && ln -s ../../testfile"`, ALPINE) Expect(err).ToNot(HaveOccurred()) defer file.Close() - runLs := podmanTest.Podman([]string{"run", "-t", "-i", "--rm", "-v", fmt.Sprintf("%v:/etc/ssl", volName), ALPINE, "ls", "-1", "/etc/ssl"}) + runLs := podmanTest.Podman([]string{"run", "--rm", "-v", fmt.Sprintf("%v:/etc/ssl", volName), ALPINE, "ls", "-1", "/etc/ssl"}) runLs.WaitWithDefaultTimeout() Expect(runLs).Should(Exit(0)) outputArr := runLs.OutputToStringArray() @@ -746,7 +746,7 @@ VOLUME /test/`, ALPINE) It("same volume in multiple places does not deadlock", func() { volName := "testVol1" - session := podmanTest.Podman([]string{"run", "-t", "-i", "-v", fmt.Sprintf("%s:/test1", volName), "-v", fmt.Sprintf("%s:/test2", volName), "--rm", ALPINE, "sh", "-c", "mount | grep /test"}) + session := podmanTest.Podman([]string{"run", "-v", fmt.Sprintf("%s:/test1", volName), "-v", fmt.Sprintf("%s:/test2", volName), "--rm", ALPINE, "sh", "-c", "mount | grep /test"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToStringArray()).To(HaveLen(2)) @@ -987,7 +987,7 @@ USER testuser`, fedoraMinimal) Expect(err).ToNot(HaveOccurred()) }() - run := podmanTest.Podman([]string{"run", "-it", "--security-opt", "label=disable", "-v", "./:" + dest, ALPINE, "ls", dest}) + run := podmanTest.Podman([]string{"run", "--security-opt", "label=disable", "-v", "./:" + dest, ALPINE, "ls", dest}) run.WaitWithDefaultTimeout() Expect(run).Should(Exit(0)) Expect(run.OutputToString()).Should(ContainSubstring(strings.TrimLeft("/vol/", f.Name()))) diff --git a/test/e2e/start_test.go b/test/e2e/start_test.go index e0fa8d2b3f..9c9dd496ed 100644 --- a/test/e2e/start_test.go +++ b/test/e2e/start_test.go @@ -155,7 +155,7 @@ var _ = Describe("Podman start", func() { }) It("podman failed to start with --rm should delete the container", func() { - session := podmanTest.Podman([]string{"create", "--name", "test1", "-it", "--rm", ALPINE, "foo"}) + session := podmanTest.Podman([]string{"create", "--name", "test1", "--rm", ALPINE, "foo"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) @@ -170,7 +170,7 @@ var _ = Describe("Podman start", func() { }) It("podman failed to start without --rm should NOT delete the container", func() { - session := podmanTest.Podman([]string{"create", "-it", ALPINE, "foo"}) + session := podmanTest.Podman([]string{"create", ALPINE, "foo"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) diff --git a/test/e2e/systemd_test.go b/test/e2e/systemd_test.go index 2070d06065..b486cfeb20 100644 --- a/test/e2e/systemd_test.go +++ b/test/e2e/systemd_test.go @@ -90,7 +90,7 @@ WantedBy=default.target started := podmanTest.WaitContainerReady(ctrName, "Reached target multi-user.target - Multi-User System.", 30, 1) Expect(started).To(BeTrue()) - systemctl := podmanTest.Podman([]string{"exec", "-t", "-i", ctrName, "systemctl", "status", "--no-pager"}) + systemctl := podmanTest.Podman([]string{"exec", ctrName, "systemctl", "status", "--no-pager"}) systemctl.WaitWithDefaultTimeout() Expect(systemctl).Should(Exit(0)) Expect(systemctl.OutputToString()).To(ContainSubstring("State:")) diff --git a/test/e2e/update_test.go b/test/e2e/update_test.go index 04240a20c0..640621d51a 100644 --- a/test/e2e/update_test.go +++ b/test/e2e/update_test.go @@ -55,43 +55,43 @@ var _ = Describe("Podman update", func() { Expect(session).Should(Exit(0)) // checking cpu quota from --cpus - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/cpu/cpu.cfs_quota_us"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/cpu/cpu.cfs_quota_us"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(ContainSubstring("500000")) // checking cpuset-cpus - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/cpuset/cpuset.cpus"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/cpuset/cpuset.cpus"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(Equal("0")) // checking cpuset-mems - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/cpuset/cpuset.mems"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/cpuset/cpuset.mems"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(Equal("0")) // checking memory limit - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/memory/memory.limit_in_bytes"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/memory/memory.limit_in_bytes"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(ContainSubstring("1073741824")) // checking memory-swap - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/memory/memory.memsw.limit_in_bytes"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/memory/memory.memsw.limit_in_bytes"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(ContainSubstring("2147483648")) // checking cpu-shares - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/cpu/cpu.shares"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/cpu/cpu.shares"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(ContainSubstring("123")) // checking pids-limit - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/pids/pids.max"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/pids/pids.max"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(ContainSubstring("123")) @@ -119,7 +119,7 @@ var _ = Describe("Podman update", func() { ctrID = session.OutputToString() // checking pids-limit was not changed after update when not specified as an option - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/pids.max"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/pids.max"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(ContainSubstring("max")) @@ -158,55 +158,55 @@ var _ = Describe("Podman update", func() { ctrID = session.OutputToString() // checking cpu quota and period - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/cpu.max"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/cpu.max"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(ContainSubstring("500000")) // checking blkio weight - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/io.bfq.weight"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/io.bfq.weight"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(ContainSubstring("123")) // checking device-read/write-bps/iops - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/io.max"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/io.max"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(ContainSubstring("rbps=10485760 wbps=10485760 riops=1000 wiops=1000")) // checking cpuset-cpus - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/cpuset.cpus"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/cpuset.cpus"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(Equal("0")) // checking cpuset-mems - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/cpuset.mems"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/cpuset.mems"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(Equal("0")) // checking memory limit - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/memory.max"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/memory.max"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(ContainSubstring("1073741824")) // checking memory-swap - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/memory.swap.max"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/memory.swap.max"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(ContainSubstring("1073741824")) // checking cpu-shares - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/cpu.weight"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/cpu.weight"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(ContainSubstring("5")) // checking pids-limit - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/pids.max"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/pids.max"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).Should(ContainSubstring("123")) @@ -230,9 +230,9 @@ var _ = Describe("Podman update", func() { ctrID := session.OutputToString() if v2, _ := cgroupv2.Enabled(); v2 { - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/cpu.max"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/cpu.max"}) } else { - session = podmanTest.Podman([]string{"exec", "-it", ctrID, "cat", "/sys/fs/cgroup/cpu/cpu.cfs_quota_us"}) + session = podmanTest.Podman([]string{"exec", ctrID, "cat", "/sys/fs/cgroup/cpu/cpu.cfs_quota_us"}) } session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0))