Skip to content

Commit 35cfdaa

Browse files
committed
test: skip cleanup of additional kind cluster if flag is set
1 parent ad97dc5 commit 35cfdaa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/e2e/clusterctl_upgrade.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,10 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg
745745

746746
// Dumps all the resources in the spec namespace, then cleanups the cluster object and the spec namespace itself.
747747
if input.UseKindForManagementCluster {
748-
managementClusterProxy.Dispose(ctx)
749-
managementClusterProvider.Dispose(ctx)
748+
if !input.SkipCleanup {
749+
managementClusterProxy.Dispose(ctx)
750+
managementClusterProvider.Dispose(ctx)
751+
}
750752
} else {
751753
framework.DumpSpecResourcesAndCleanup(ctx, specName, input.BootstrapClusterProxy, input.ArtifactFolder, managementClusterNamespace, managementClusterCancelWatches, managementClusterResources.Cluster, input.E2EConfig.GetIntervals, input.SkipCleanup)
752754
}

0 commit comments

Comments
 (0)