summaryrefslogtreecommitdiff
path: root/test/e2e/libpod_suite_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/libpod_suite_test.go')
-rw-r--r--test/e2e/libpod_suite_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go
index e6f110dad..b8e650e30 100644
--- a/test/e2e/libpod_suite_test.go
+++ b/test/e2e/libpod_suite_test.go
@@ -439,3 +439,13 @@ func (s *PodmanSession) LineInOuputContains(term string) bool {
}
return false
}
+
+//GetContainerStatus returns the containers state.
+// This function assumes only one container is active.
+func (p *PodmanTest) GetContainerStatus() string {
+ var podmanArgs = []string{"ps"}
+ podmanArgs = append(podmanArgs, "--all", "--format={{.Status}}")
+ session := p.Podman(podmanArgs)
+ session.WaitWithDefaultTimeout()
+ return session.OutputToString()
+}