From 9e8cca26a1d93f975008d142cd64d1745e68340e Mon Sep 17 00:00:00 2001
From: Valentin Rothberg <vrothberg@redhat.com>
Date: Mon, 21 Mar 2022 13:52:17 +0100
Subject: test/e2e/inspect_test.go: wait for sessions

Make sure we're waiting for the ls container to finish to prevent
potential flakes or future regressions.

Spotted while enabling a linter.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
---
 test/e2e/inspect_test.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'test/e2e')

diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go
index 08bdc9488..bb5a3a6ad 100644
--- a/test/e2e/inspect_test.go
+++ b/test/e2e/inspect_test.go
@@ -95,7 +95,8 @@ var _ = Describe("Podman inspect", func() {
 	})
 
 	It("podman inspect container with size", func() {
-		_, ec, _ := podmanTest.RunLsContainer("sizetest")
+		session, ec, _ := podmanTest.RunLsContainer("sizetest")
+		session.WaitWithDefaultTimeout()
 		Expect(ec).To(Equal(0))
 
 		result := podmanTest.Podman([]string{"inspect", "--size", "sizetest"})
@@ -108,6 +109,7 @@ var _ = Describe("Podman inspect", func() {
 
 	It("podman inspect container and image", func() {
 		ls, ec, _ := podmanTest.RunLsContainer("")
+		ls.WaitWithDefaultTimeout()
 		Expect(ec).To(Equal(0))
 		cid := ls.OutputToString()
 
@@ -119,6 +121,7 @@ var _ = Describe("Podman inspect", func() {
 
 	It("podman inspect container and filter for Image{ID}", func() {
 		ls, ec, _ := podmanTest.RunLsContainer("")
+		ls.WaitWithDefaultTimeout()
 		Expect(ec).To(Equal(0))
 		cid := ls.OutputToString()
 
@@ -135,6 +138,7 @@ var _ = Describe("Podman inspect", func() {
 
 	It("podman inspect container and filter for CreateCommand", func() {
 		ls, ec, _ := podmanTest.RunLsContainer("")
+		ls.WaitWithDefaultTimeout()
 		Expect(ec).To(Equal(0))
 		cid := ls.OutputToString()
 
-- 
cgit v1.2.3-54-g00ecf