diff --git a/test/e2e/toolbox_test.go b/test/e2e/toolbox_test.go index 6deb7dee548f..d4b054c176ea 100644 --- a/test/e2e/toolbox_test.go +++ b/test/e2e/toolbox_test.go @@ -257,9 +257,9 @@ var _ = Describe("Toolbox-specific testing", func() { var username string = "testuser" var homeDir string = "/home/testuser" var shell string = "/bin/bash" - var uid string = "2000" + var uid string = "1411" var groupName string = "testgroup" - var gid string = "2000" + var gid string = "1422" // The use of bad* in the name of variables does not imply the invocation // of useradd should fail The user is supposed to be created successfully diff --git a/test/utils/utils.go b/test/utils/utils.go index 24c435ac20ba..205c4edd89cd 100644 --- a/test/utils/utils.go +++ b/test/utils/utils.go @@ -225,14 +225,14 @@ func (p *PodmanTest) WaitContainerReady(id string, expStr string, timeout int, s s.WaitWithDefaultTimeout() for { + if strings.Contains(s.OutputToString(), expStr) || strings.Contains(s.ErrorToString(), expStr) { + return true + } + if time.Since(startTime) >= time.Duration(timeout)*time.Second { GinkgoWriter.Printf("Container %s is not ready in %ds", id, timeout) return false } - - if strings.Contains(s.OutputToString(), expStr) || strings.Contains(s.ErrorToString(), expStr) { - return true - } time.Sleep(time.Duration(step) * time.Second) s = p.PodmanBase([]string{"logs", id}, false, true) s.WaitWithDefaultTimeout()