@@ -14,7 +14,6 @@ import (
1414	. "github.com/onsi/ginkgo/v2" 
1515	corev1 "k8s.io/api/core/v1" 
1616
17- 	clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" 
1817	"sigs.k8s.io/cluster-api/test/framework" 
1918	"sigs.k8s.io/cluster-api/util" 
2019)
@@ -49,33 +48,3 @@ func createNamespace(ctx context.Context, specName string, clusterProxy framewor
4948	}, timeout , interval )
5049	return  namespace 
5150}
52- 
53- // dumpSpecResourcesAndCleanup dump all ressource and delete cluster and namespace 
54- func  dumpSpecResourcesAndCleanup (ctx  context.Context , specName  string , clusterProxy  framework.ClusterProxy , artifactFolder  string , namespace  * corev1.Namespace , cancelWatches  context.CancelFunc , cluster  * clusterv1.Cluster , intervalsGetter  func (spec , key  string ) []interface {}, skipCleanup  bool ) {
55- 	Byf ("Dumping logs from the %q workload cluster" , cluster .Name )
56- 
57- 	clusterProxy .CollectWorkloadClusterLogs (ctx , cluster .Namespace , cluster .Name , filepath .Join (artifactFolder , "clusters" , cluster .Name ))
58- 
59- 	Byf ("Dumping all the Cluster API resources in the %q namespace" , namespace .Name )
60- 
61- 	framework .DumpAllResources (ctx , framework.DumpAllResourcesInput {
62- 		Lister :    clusterProxy .GetClient (),
63- 		Namespace : namespace .Name ,
64- 		LogPath :   filepath .Join (artifactFolder , "clusters" , clusterProxy .GetName (), "resources" ),
65- 	})
66- 
67- 	if  ! skipCleanup  {
68- 		Byf ("Deleting cluster %s/%s" , cluster .Namespace , cluster .Name )
69- 		framework .DeleteAllClustersAndWait (ctx , framework.DeleteAllClustersAndWaitInput {
70- 			ClusterProxy : clusterProxy ,
71- 			Namespace :    namespace .Name ,
72- 		}, intervalsGetter (specName , "wait-delete-cluster" )... )
73- 
74- 		Byf ("Deleting namespace used for hosting the %q test spec" , specName )
75- 		framework .DeleteNamespace (ctx , framework.DeleteNamespaceInput {
76- 			Deleter : clusterProxy .GetClient (),
77- 			Name :    namespace .Name ,
78- 		})
79- 	}
80- 	cancelWatches ()
81- }
0 commit comments