summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-04-18 18:03:52 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-19 16:56:29 +0000
commit228732deccb46125f45bdc3a3c04b959931f048e (patch)
treeeb920aed2eda7ac86565761617abcfac71a096e7 /test/e2e
parent2cf78a2006200253d6763bf111204476cd0c3c82 (diff)
downloadpodman-228732deccb46125f45bdc3a3c04b959931f048e.tar.gz
podman-228732deccb46125f45bdc3a3c04b959931f048e.tar.bz2
podman-228732deccb46125f45bdc3a3c04b959931f048e.zip
Fix tests for podman run --attach
When STDOUT and STDERR are not attached, we now print a container ID. Make the tests aware of this. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #638 Approved by: rhatdan
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_test.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 94a1fef57..66e5791a7 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -316,11 +316,14 @@ var _ = Describe("Podman run", func() {
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)"))
})
- It("podman run with attach stdin has no output", func() {
- session := podmanTest.Podman([]string{"run", "--rm", "--attach", "stdin", ALPINE, "printenv"})
+ It("podman run with attach stdin outputs container ID", func() {
+ session := podmanTest.Podman([]string{"run", "--attach", "stdin", ALPINE, "printenv"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- Expect(session.OutputToString()).To(Equal(""))
+ ps := podmanTest.Podman([]string{"ps", "-aq", "--no-trunc"})
+ ps.WaitWithDefaultTimeout()
+ Expect(ps.ExitCode()).To(Equal(0))
+ Expect(ps.LineInOutputContains(session.OutputToString())).To(BeTrue())
})
It("podman run with attach stdout does not print stderr", func() {