summaryrefslogtreecommitdiff
path: root/test/utils
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-20 18:39:36 -0400
committerGitHub <noreply@github.com>2021-09-20 18:39:36 -0400
commitb925d707fa768245b3bd50d570b91992c1814dba (patch)
tree37fc3f7acb526c8fbc76e75674825aa5949f0d58 /test/utils
parent7e8ce73c15036d50fc31f763c903c264392f1e04 (diff)
parent8453c8ce63b6ec3799f67198fd7119add67722d6 (diff)
downloadpodman-b925d707fa768245b3bd50d570b91992c1814dba.tar.gz
podman-b925d707fa768245b3bd50d570b91992c1814dba.tar.bz2
podman-b925d707fa768245b3bd50d570b91992c1814dba.zip
Merge pull request #11639 from jwhonce/issues/2221
Support --format tables in ps output
Diffstat (limited to 'test/utils')
-rw-r--r--test/utils/utils.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/test/utils/utils.go b/test/utils/utils.go
index 80af7fb7c..bfefc58ec 100644
--- a/test/utils/utils.go
+++ b/test/utils/utils.go
@@ -19,7 +19,7 @@ import (
)
var (
- defaultWaitTimeout = 90
+ DefaultWaitTimeout = 90
OSReleasePath = "/etc/os-release"
ProcessOneCgroupPath = "/proc/1/cgroup"
)
@@ -317,15 +317,20 @@ func (s *PodmanSession) IsJSONOutputValid() bool {
return true
}
-// WaitWithDefaultTimeout waits for process finished with defaultWaitTimeout
+// WaitWithDefaultTimeout waits for process finished with DefaultWaitTimeout
func (s *PodmanSession) WaitWithDefaultTimeout() {
- Eventually(s, defaultWaitTimeout).Should(Exit())
+ s.WaitWithTimeout(DefaultWaitTimeout)
+}
+
+// WaitWithTimeout waits for process finished with DefaultWaitTimeout
+func (s *PodmanSession) WaitWithTimeout(timeout int) {
+ Eventually(s, timeout).Should(Exit())
os.Stdout.Sync()
os.Stderr.Sync()
fmt.Println("output:", s.OutputToString())
}
-// CreateTempDirinTempDir create a temp dir with prefix podman_test
+// CreateTempDirInTempDir create a temp dir with prefix podman_test
func CreateTempDirInTempDir() (string, error) {
return ioutil.TempDir("", "podman_test")
}
@@ -337,7 +342,7 @@ func SystemExec(command string, args []string) *PodmanSession {
if err != nil {
Fail(fmt.Sprintf("unable to run command: %s %s", command, strings.Join(args, " ")))
}
- session.Wait(defaultWaitTimeout)
+ session.Wait(DefaultWaitTimeout)
return &PodmanSession{session}
}