summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorToshiki Sonoda <sonoda.toshiki@fujitsu.com>2022-07-08 08:33:20 +0900
committerToshiki Sonoda <sonoda.toshiki@fujitsu.com>2022-07-08 08:33:20 +0900
commitd1754bdd4f299c8d92671493add4a69ef7850e1d (patch)
treec4fd3d741d641d16267aa8431c430cc095ac250e /test
parent700f1faf6e5449e13970fc17311b09e4ca9ac2c3 (diff)
downloadpodman-d1754bdd4f299c8d92671493add4a69ef7850e1d.tar.gz
podman-d1754bdd4f299c8d92671493add4a69ef7850e1d.tar.bz2
podman-d1754bdd4f299c8d92671493add4a69ef7850e1d.zip
Refactored networkPrune function
Refactored the networkPrune function to improve readability. This commit changes the `networkPrune` function to use the `PrintNetworkPruneResults` function. [NO NEW TESTS NEEDED] Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/prune_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go
index 119c8d41e..89cc65540 100644
--- a/test/e2e/prune_test.go
+++ b/test/e2e/prune_test.go
@@ -259,11 +259,12 @@ var _ = Describe("Podman prune", func() {
})
It("podman system prune networks", func() {
- // About netavark network backend test.
+ // Create new network.
session := podmanTest.Podman([]string{"network", "create", "test"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
+ // Remove all unused networks.
session = podmanTest.Podman([]string{"system", "prune", "-f"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
@@ -274,7 +275,7 @@ var _ = Describe("Podman prune", func() {
Expect(session).Should(Exit(0))
Expect(session.OutputToStringArray()).To(HaveLen(1))
- // Remove all unused networks.
+ // Unused networks removed.
session = podmanTest.Podman([]string{"network", "ls", "-q", "--filter", "name=^test$"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))