From a79b6ec8665de7648ed6771248e1dfa49f581087 Mon Sep 17 00:00:00 2001 From: Manabu Mccloskey Date: Thu, 26 Oct 2023 15:28:40 -0700 Subject: [PATCH] ensure container is removed Signed-off-by: Manabu Mccloskey --- pkg/kind/registry_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/kind/registry_test.go b/pkg/kind/registry_test.go index 059cefca..59b1a9e3 100644 --- a/pkg/kind/registry_test.go +++ b/pkg/kind/registry_test.go @@ -33,6 +33,7 @@ func TestReconcileRegistry(t *testing.T) { // Create registry err = cluster.ReconcileRegistry(ctx) + defer dockerCli.ContainerRemove(ctx, cluster.getRegistryContainerName(), types.ContainerRemoveOptions{Force: true}) if err != nil { t.Fatalf("Error reconciling registry: %v", err) } @@ -53,9 +54,4 @@ func TestReconcileRegistry(t *testing.T) { if err != nil { t.Fatalf("Error reconciling registry: %v", err) } - - // Cleanup - if err = dockerCli.ContainerRemove(ctx, container.ID, types.ContainerRemoveOptions{Force: true}); err != nil { - t.Fatalf("Error removing registry docker container after reconcile: %v", err) - } }