summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-05-10 13:23:04 +0200
committerMatthew Heon <mheon@redhat.com>2022-06-14 13:15:19 -0400
commita554ff48eb4d40e9106f1146192da385505174a6 (patch)
treefc21216a7a7701fc823899efeb031df65a4661e8
parent88a7ce7d511336fd3505ee9701d118331bcbee4c (diff)
downloadpodman-a554ff48eb4d40e9106f1146192da385505174a6.tar.gz
podman-a554ff48eb4d40e9106f1146192da385505174a6.tar.bz2
podman-a554ff48eb4d40e9106f1146192da385505174a6.zip
test: simplify cleanup code
do not try to first stop and then rm but combine the two operations in a single command. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r--test/e2e/common_test.go14
1 files changed, 5 insertions, 9 deletions
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go
index 28991af7f..db194b777 100644
--- a/test/e2e/common_test.go
+++ b/test/e2e/common_test.go
@@ -516,17 +516,13 @@ func (p *PodmanTestIntegration) PodmanPID(args []string) (*PodmanSessionIntegrat
// Cleanup cleans up the temporary store
func (p *PodmanTestIntegration) Cleanup() {
- // Remove all containers
- stopall := p.Podman([]string{"stop", "-a", "--time", "0"})
- stopall.WaitWithDefaultTimeout()
-
- podstop := p.Podman([]string{"pod", "stop", "-a", "-t", "0"})
- podstop.WaitWithDefaultTimeout()
- podrm := p.Podman([]string{"pod", "rm", "-fa"})
+ // Remove all pods...
+ podrm := p.Podman([]string{"pod", "rm", "-fa", "-t", "0"})
podrm.WaitWithDefaultTimeout()
- session := p.Podman([]string{"rm", "-fa"})
- session.WaitWithDefaultTimeout()
+ // ...and containers
+ rmall := p.Podman([]string{"rm", "-fa", "-t", "0"})
+ rmall.WaitWithDefaultTimeout()
p.StopRemoteService()
// Nuke tempdir