aboutsummaryrefslogtreecommitdiff
path: root/test/e2e/libpod_suite_test.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-03-15 11:03:30 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-15 17:45:11 +0000
commit8d7dc94a2773cc3ad9a36f3318f987ccee097666 (patch)
tree7cbf5081e03b4e92da5ad22ca4cce73737181a0a /test/e2e/libpod_suite_test.go
parent1856703e38e67ad5ab5e634757fe5fe0ccd34d8e (diff)
downloadpodman-8d7dc94a2773cc3ad9a36f3318f987ccee097666.tar.gz
podman-8d7dc94a2773cc3ad9a36f3318f987ccee097666.tar.bz2
podman-8d7dc94a2773cc3ad9a36f3318f987ccee097666.zip
Add extra E2E test for restarting containers
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #482 Approved by: baude
Diffstat (limited to 'test/e2e/libpod_suite_test.go')
-rw-r--r--test/e2e/libpod_suite_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go
index 10247f428..4d4f2905c 100644
--- a/test/e2e/libpod_suite_test.go
+++ b/test/e2e/libpod_suite_test.go
@@ -166,6 +166,18 @@ func (p *PodmanTest) Podman(args []string) *PodmanSession {
return &PodmanSession{session}
}
+
+//WaitForContainer waits on a started container
+func WaitForContainer(p *PodmanTest) bool {
+ for i := 0; i < 10; i++ {
+ if p.NumberOfContainers() == 1 {
+ return true
+ }
+ time.Sleep(1 * time.Second)
+ }
+ return false
+}
+
// Cleanup cleans up the temporary store
func (p *PodmanTest) Cleanup() {
// Remove all containers