diff options
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/mount_test.go | 17 | ||||
-rw-r--r-- | test/e2e/network_create_test.go | 9 | ||||
-rw-r--r-- | test/e2e/run_cleanup_test.go | 4 | ||||
-rw-r--r-- | test/e2e/run_networking_test.go | 12 |
4 files changed, 32 insertions, 10 deletions
diff --git a/test/e2e/mount_test.go b/test/e2e/mount_test.go index 141d1a386..5ecd61097 100644 --- a/test/e2e/mount_test.go +++ b/test/e2e/mount_test.go @@ -169,7 +169,7 @@ var _ = Describe("Podman mount", func() { Expect(setup).Should(Exit(0)) cid := setup.OutputToString() - lmount := podmanTest.Podman([]string{"mount", "--notruncate"}) + lmount := podmanTest.Podman([]string{"mount", "--no-trunc"}) lmount.WaitWithDefaultTimeout() Expect(lmount).Should(Exit(0)) Expect(lmount.OutputToString()).To(Equal("")) @@ -178,7 +178,7 @@ var _ = Describe("Podman mount", func() { mount.WaitWithDefaultTimeout() Expect(mount).Should(Exit(0)) - lmount = podmanTest.Podman([]string{"mount", "--notruncate"}) + lmount = podmanTest.Podman([]string{"mount", "--no-trunc"}) lmount.WaitWithDefaultTimeout() Expect(lmount).Should(Exit(0)) Expect(lmount.OutputToString()).To(ContainSubstring(cid)) @@ -195,7 +195,7 @@ var _ = Describe("Podman mount", func() { Expect(setup).Should(Exit(0)) cid := setup.OutputToString() - lmount := podmanTest.Podman([]string{"mount", "--notruncate"}) + lmount := podmanTest.Podman([]string{"mount", "--no-trunc"}) lmount.WaitWithDefaultTimeout() Expect(lmount).Should(Exit(0)) Expect(lmount.OutputToString()).To(ContainSubstring(cid)) @@ -204,7 +204,7 @@ var _ = Describe("Podman mount", func() { stop.WaitWithDefaultTimeout() Expect(stop).Should(Exit(0)) - lmount = podmanTest.Podman([]string{"mount", "--notruncate"}) + lmount = podmanTest.Podman([]string{"mount", "--no-trunc"}) lmount.WaitWithDefaultTimeout() Expect(lmount).Should(Exit(0)) Expect(lmount.OutputToString()).To(Equal("")) @@ -227,7 +227,7 @@ var _ = Describe("Podman mount", func() { Expect(setup).Should(Exit(0)) cid3 := setup.OutputToString() - lmount := podmanTest.Podman([]string{"mount", "--notruncate"}) + lmount := podmanTest.Podman([]string{"mount", "--no-trunc"}) lmount.WaitWithDefaultTimeout() Expect(lmount).Should(Exit(0)) Expect(lmount.OutputToString()).To(Equal("")) @@ -236,7 +236,7 @@ var _ = Describe("Podman mount", func() { mount.WaitWithDefaultTimeout() Expect(mount).Should(Exit(0)) - lmount = podmanTest.Podman([]string{"mount", "--notruncate"}) + lmount = podmanTest.Podman([]string{"mount", "--no-trunc"}) lmount.WaitWithDefaultTimeout() Expect(lmount).Should(Exit(0)) Expect(lmount.OutputToString()).To(ContainSubstring(cid1)) @@ -247,7 +247,7 @@ var _ = Describe("Podman mount", func() { umount.WaitWithDefaultTimeout() Expect(umount).Should(Exit(0)) - lmount = podmanTest.Podman([]string{"mount", "--notruncate"}) + lmount = podmanTest.Podman([]string{"mount", "--no-trunc"}) lmount.WaitWithDefaultTimeout() Expect(lmount).Should(Exit(0)) Expect(lmount.OutputToString()).To(Equal("")) @@ -261,7 +261,7 @@ var _ = Describe("Podman mount", func() { Expect(setup).Should(Exit(0)) cid := setup.OutputToString() - lmount := podmanTest.Podman([]string{"mount", "--notruncate"}) + lmount := podmanTest.Podman([]string{"mount", "--no-trunc"}) lmount.WaitWithDefaultTimeout() Expect(lmount).Should(Exit(0)) Expect(lmount.OutputToString()).To(Equal("")) @@ -270,6 +270,7 @@ var _ = Describe("Podman mount", func() { mount.WaitWithDefaultTimeout() Expect(mount).Should(Exit(0)) + // test --notruncate alias lmount = podmanTest.Podman([]string{"mount", "--notruncate"}) lmount.WaitWithDefaultTimeout() Expect(lmount).Should(Exit(0)) diff --git a/test/e2e/network_create_test.go b/test/e2e/network_create_test.go index d419a701d..ae9f112b5 100644 --- a/test/e2e/network_create_test.go +++ b/test/e2e/network_create_test.go @@ -343,4 +343,13 @@ var _ = Describe("Podman network create", func() { Expect(nc.OutputToString()).ToNot(ContainSubstring("dnsname")) }) + It("podman network create with invalid name", func() { + for _, name := range []string{"none", "host", "bridge", "private", "slirp4netns", "container", "ns"} { + nc := podmanTest.Podman([]string{"network", "create", name}) + nc.WaitWithDefaultTimeout() + Expect(nc).To(Exit(125)) + Expect(nc.ErrorToString()).To(ContainSubstring("cannot create network with name %q because it conflicts with a valid network mode", name)) + } + }) + }) diff --git a/test/e2e/run_cleanup_test.go b/test/e2e/run_cleanup_test.go index cfe11079d..6753fcf12 100644 --- a/test/e2e/run_cleanup_test.go +++ b/test/e2e/run_cleanup_test.go @@ -46,7 +46,7 @@ var _ = Describe("Podman run exit", func() { Expect(mount).Should(Exit(0)) Expect(mount.OutputToString()).To(ContainSubstring(cid)) - pmount := podmanTest.Podman([]string{"mount", "--notruncate"}) + pmount := podmanTest.Podman([]string{"mount", "--no-trunc"}) pmount.WaitWithDefaultTimeout() Expect(pmount).Should(Exit(0)) Expect(pmount.OutputToString()).To(ContainSubstring(cid)) @@ -64,7 +64,7 @@ var _ = Describe("Podman run exit", func() { Expect(mount).Should(Exit(0)) Expect(mount.OutputToString()).NotTo(ContainSubstring(cid)) - pmount = podmanTest.Podman([]string{"mount", "--notruncate"}) + pmount = podmanTest.Podman([]string{"mount", "--no-trunc"}) pmount.WaitWithDefaultTimeout() Expect(pmount).Should(Exit(0)) Expect(pmount.OutputToString()).NotTo(ContainSubstring(cid)) diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go index 8eabeba97..c7ffdaf4c 100644 --- a/test/e2e/run_networking_test.go +++ b/test/e2e/run_networking_test.go @@ -709,6 +709,18 @@ var _ = Describe("Podman run networking", func() { Expect(strings.Contains(run.OutputToString(), hostname)).To(BeTrue()) }) + It("podman run with pod does not add extra 127 entry to /etc/hosts", func() { + pod := "testpod" + hostname := "test-hostname" + run := podmanTest.Podman([]string{"pod", "create", "--hostname", hostname, "--name", pod}) + run.WaitWithDefaultTimeout() + Expect(run).Should(Exit(0)) + run = podmanTest.Podman([]string{"run", "--pod", pod, ALPINE, "cat", "/etc/hosts"}) + run.WaitWithDefaultTimeout() + Expect(run).Should(Exit(0)) + Expect(run.OutputToString()).ToNot(ContainSubstring("127.0.0.1 %s", hostname)) + }) + ping_test := func(netns string) { hostname := "testctr" run := podmanTest.Podman([]string{"run", netns, "--hostname", hostname, ALPINE, "ping", "-c", "1", hostname}) |