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(