From d1754bdd4f299c8d92671493add4a69ef7850e1d Mon Sep 17 00:00:00 2001 From: Toshiki Sonoda Date: Fri, 8 Jul 2022 08:33:20 +0900 Subject: 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 --- test/e2e/prune_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/e2e') 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)) -- cgit v1.2.3-54-g00ecf