diff options
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/diff_test.go | 14 | ||||
-rw-r--r-- | test/e2e/ps_test.go | 12 | ||||
-rw-r--r-- | test/e2e/run_networking_test.go | 6 |
3 files changed, 32 insertions, 0 deletions
diff --git a/test/e2e/diff_test.go b/test/e2e/diff_test.go index 0f53d9bc8..d273f9463 100644 --- a/test/e2e/diff_test.go +++ b/test/e2e/diff_test.go @@ -80,4 +80,18 @@ var _ = Describe("Podman diff", func() { sort.Strings(imageDiff) Expect(imageDiff).To(Equal(containerDiff)) }) + + It("podman diff latest container", func() { + SkipIfRemote() + session := podmanTest.Podman([]string{"run", "--name=diff-test", ALPINE, "touch", "/tmp/diff-test"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + session = podmanTest.Podman([]string{"diff", "-l"}) + session.WaitWithDefaultTimeout() + containerDiff := session.OutputToStringArray() + sort.Strings(containerDiff) + Expect(session.LineInOutputContains("C /tmp")).To(BeTrue()) + Expect(session.LineInOutputContains("A /tmp/diff-test")).To(BeTrue()) + Expect(session.ExitCode()).To(Equal(0)) + }) }) diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go index b0a28501a..2b86f663f 100644 --- a/test/e2e/ps_test.go +++ b/test/e2e/ps_test.go @@ -320,4 +320,16 @@ var _ = Describe("Podman ps", func() { session.WaitWithDefaultTimeout() Expect(session.OutputToString()).To(ContainSubstring("0.0.0.0:1000-1006")) }) + + It("podman ps sync flag", func() { + session := podmanTest.RunTopContainer("") + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + fullCid := session.OutputToString() + + result := podmanTest.Podman([]string{"ps", "-q", "--no-trunc", "--sync"}) + result.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + Expect(result.OutputToStringArray()[0]).To(Equal(fullCid)) + }) }) diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go index 1497a651b..31291d373 100644 --- a/test/e2e/run_networking_test.go +++ b/test/e2e/run_networking_test.go @@ -178,6 +178,12 @@ var _ = Describe("Podman run networking", func() { Expect(exec4.OutputToString()).To(ContainSubstring("192.0.2.2 test1")) }) + It("podman run /etc/hosts contains --hostname", func() { + session := podmanTest.Podman([]string{"run", "--rm", "--hostname", "foohostname", ALPINE, "grep", "foohostname", "/etc/hosts"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + }) + It("podman run network in user created network namespace", func() { SkipIfRootless() if Containerized() { |