@@ -27,6 +27,7 @@ import (
27
27
28
28
. "github.com/onsi/ginkgo/v2"
29
29
. "github.com/onsi/gomega"
30
+ "github.com/onsi/gomega/gmeasure"
30
31
corev1 "k8s.io/api/core/v1"
31
32
"k8s.io/utils/ptr"
32
33
"sigs.k8s.io/cluster-api/test/framework/clusterctl"
@@ -39,7 +40,6 @@ import (
39
40
var _ = Describe ("conformance tests" , func () {
40
41
var (
41
42
namespace * corev1.Namespace
42
- ctx context.Context
43
43
specName = "conformance"
44
44
)
45
45
@@ -53,7 +53,7 @@ var _ = Describe("conformance tests", func() {
53
53
shared .ApplyCoreImagesPlus (ctx , e2eCtx )
54
54
})
55
55
56
- Measure (specName , func (b Benchmarker ) {
56
+ It (specName , func (ctx context. Context ) {
57
57
name := fmt .Sprintf ("cluster-%s" , namespace .Name )
58
58
kubernetesVersion := e2eCtx .E2EConfig .GetVariable (shared .KubernetesVersion )
59
59
@@ -70,7 +70,10 @@ var _ = Describe("conformance tests", func() {
70
70
controlPlaneMachineCount , err := strconv .ParseInt (e2eCtx .E2EConfig .GetVariable ("CONFORMANCE_CONTROL_PLANE_MACHINE_COUNT" ), 10 , 64 )
71
71
Expect (err ).NotTo (HaveOccurred ())
72
72
73
- b .Time ("cluster creation" , func () {
73
+ experiment := gmeasure .NewExperiment (specName )
74
+ AddReportEntry (experiment .Name , experiment )
75
+
76
+ experiment .MeasureDuration ("cluster creation" , func () {
74
77
result := & clusterctl.ApplyClusterTemplateAndWaitResult {}
75
78
clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
76
79
ClusterProxy : e2eCtx .Environment .BootstrapClusterProxy ,
@@ -93,7 +96,7 @@ var _ = Describe("conformance tests", func() {
93
96
})
94
97
95
98
workloadProxy := e2eCtx .Environment .BootstrapClusterProxy .GetWorkloadCluster (ctx , namespace .Name , name )
96
- b . Time ("conformance suite" , func () {
99
+ experiment . MeasureDuration ("conformance suite" , func () {
97
100
err := kubetest .Run (ctx ,
98
101
kubetest.RunInput {
99
102
ClusterProxy : workloadProxy ,
@@ -104,10 +107,5 @@ var _ = Describe("conformance tests", func() {
104
107
)
105
108
Expect (err ).To (BeNil (), "error on kubetest execution" )
106
109
})
107
- }, 1 )
108
-
109
- AfterEach (func () {
110
- // Dumps all the resources in the spec namespace, then cleanups the cluster object and the spec namespace itself.
111
- shared .DumpSpecResourcesAndCleanup (ctx , specName , namespace , e2eCtx )
112
110
})
113
111
})
0 commit comments