From 228732deccb46125f45bdc3a3c04b959931f048e Mon Sep 17 00:00:00 2001
From: Matthew Heon <matthew.heon@gmail.com>
Date: Wed, 18 Apr 2018 18:03:52 -0400
Subject: 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
---
 test/e2e/run_test.go | 9 ++++++---
 1 file 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() {
-- 
cgit v1.2.3-54-g00ecf