From 06b307927e492957e99dd6c709f60c0c9dfc8d13 Mon Sep 17 00:00:00 2001 From: thediveo Date: Mon, 24 Jun 2024 21:34:49 +0200 Subject: [PATCH] fix: test: remove test network with special pool first Signed-off-by: thediveo --- network_create_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/network_create_test.go b/network_create_test.go index ae71fa0..cdacf25 100644 --- a/network_create_test.go +++ b/network_create_test.go @@ -62,6 +62,7 @@ var _ = Describe("creating custom networks", Ordered, func() { DeferCleanup(func(ctx context.Context) { sess.Close(ctx) }) + _ = sess.Client().NetworkRemove(ctx, name) nw := Successful(sess.CreateNetwork(ctx, name, net.WithInternal(), bridge.WithBridgeName("brrr"), @@ -70,6 +71,7 @@ var _ = Describe("creating custom networks", Ordered, func() { // https://en.wikipedia.org/wiki/Reserved_IP_addresses "0.0.1.0/24", // a.k.a. "local" or "this" ipam.WithRange("0.0.1.16/28"))))) + defer func() { _ = nw.Remove(ctx) }() var buff safe.Buffer Expect(sess.Run(ctx, "busybox", run.WithCommand(