Skip to content

Commit 8761cb6

Browse files
committed
fixup! fixup! fixup! 👷 ci: remove unused/broken workflows, add e2e full & docker cleanup worklows
1 parent 956832a commit 8761cb6

File tree

2 files changed

+3
-32
lines changed

2 files changed

+3
-32
lines changed

‎test/e2e/common.go‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
}

‎test/e2e/scale_test.go‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
. "github.com/onsi/gomega"
1717
corev1 "k8s.io/api/core/v1"
1818
"k8s.io/utils/ptr"
19+
"sigs.k8s.io/cluster-api/test/framework"
1920
"sigs.k8s.io/cluster-api/test/framework/clusterctl"
2021
"sigs.k8s.io/cluster-api/util"
2122
)
@@ -85,10 +86,11 @@ var _ = Describe("[e2e][all] Scaling a cluster", func() {
8586
WaitForControlPlaneIntervals: e2eConfig.GetIntervals(specName, "wait-control-plane"),
8687
WaitForMachineDeployments: e2eConfig.GetIntervals(specName, "wait-worker-nodes"),
8788
}, result)
89+
By("PASSED!")
8890
})
8991
})
9092

9193
AfterEach(func() {
92-
dumpSpecResourcesAndCleanup(ctx, specName, bootstrapClusterProxy, artifactFolder, namespace, cancelWatches, result.Cluster, e2eConfig.GetIntervals, skipCleanup)
94+
framework.DumpSpecResourcesAndCleanup(ctx, specName, bootstrapClusterProxy, clusterctlConfigPath, artifactFolder, namespace, cancelWatches, result.Cluster, e2eConfig.GetIntervals, skipCleanup)
9395
})
9496
})

0 commit comments

Comments
 (0)