From 322364d0240cb28deea9bfac5da1069f94fd7286 Mon Sep 17 00:00:00 2001 From: Manabu Mccloskey Date: Wed, 25 Oct 2023 17:10:38 -0700 Subject: [PATCH] create kind network Signed-off-by: Manabu Mccloskey --- pkg/kind/registry_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/kind/registry_test.go b/pkg/kind/registry_test.go index 06309b8b..059cefca 100644 --- a/pkg/kind/registry_test.go +++ b/pkg/kind/registry_test.go @@ -19,6 +19,12 @@ func TestReconcileRegistry(t *testing.T) { } defer dockerCli.Close() + kindNetwork, err := dockerCli.NetworkCreate(ctx, "kind", types.NetworkCreate{}) + if err != nil { + t.Fatalf("Failed creaking kind network: %v", err) + } + defer dockerCli.NetworkRemove(ctx, kindNetwork.ID) + // Create cluster cluster, err := NewCluster("testcase", "v1.26.3", "", "", "") if err != nil { @@ -36,6 +42,8 @@ func TestReconcileRegistry(t *testing.T) { if err != nil { t.Fatalf("Error getting registry container after reconcile: %v", err) } + defer dockerCli.ImageRemove(ctx, container.ImageID, types.ImageRemoveOptions{}) + if container == nil { t.Fatal("Expected registry container after reconcile but got nil") }