aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-02-03 08:43:16 -0500
committerGitHub <noreply@github.com>2022-02-03 08:43:16 -0500
commitababa93ec5b79e4c1ff6507cd3ed7fbdcefc0e1a (patch)
tree69bc9576f3ca2d8f41a8b61c9bf23b0c725fa9fd /test
parentf2263fade4aef30fd619b648e4d1ca4aaf6bd506 (diff)
parent55c4a1468b8738a5711d213cfe7c172b463ecd24 (diff)
downloadpodman-ababa93ec5b79e4c1ff6507cd3ed7fbdcefc0e1a.tar.gz
podman-ababa93ec5b79e4c1ff6507cd3ed7fbdcefc0e1a.tar.bz2
podman-ababa93ec5b79e4c1ff6507cd3ed7fbdcefc0e1a.zip
Merge pull request #13116 from Luap99/reset-networks
system prune: remove all networks
Diffstat (limited to 'test')
-rw-r--r--test/e2e/system_reset_test.go18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/e2e/system_reset_test.go b/test/e2e/system_reset_test.go
index 641f98c38..f413ce147 100644
--- a/test/e2e/system_reset_test.go
+++ b/test/e2e/system_reset_test.go
@@ -38,6 +38,10 @@ var _ = Describe("podman system reset", func() {
SkipIfRemote("system reset not supported on podman --remote")
// system reset will not remove additional store images, so need to grab length
+ // change the network dir so that we do not conflict with other tests
+ // that would use the same network dir and cause unnecessary flakes
+ podmanTest.NetworkConfigDir = tempdir
+
session := podmanTest.Podman([]string{"rmi", "--force", "--all"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
@@ -56,16 +60,16 @@ var _ = Describe("podman system reset", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
+ session = podmanTest.Podman([]string{"network", "create"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
session = podmanTest.Podman([]string{"system", "reset", "-f"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(session.ErrorToString()).To(Not(ContainSubstring("Failed to add pause process")))
- // If remote then the API service should have exited
- // On local tests this is a noop
- podmanTest.StartRemoteService()
-
session = podmanTest.Podman([]string{"images", "-n"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
@@ -80,5 +84,11 @@ var _ = Describe("podman system reset", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(session.OutputToStringArray()).To(BeEmpty())
+
+ session = podmanTest.Podman([]string{"network", "ls", "-q"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ // default network should exists
+ Expect(session.OutputToStringArray()).To(HaveLen(1))
})
})