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) - } }