diff --git a/Makefile b/Makefile index c1046e06d..d8e6379e3 100644 --- a/Makefile +++ b/Makefile @@ -162,8 +162,8 @@ test: $(SETUP_ENVTEST) ## Run unit and integration tests KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test ./... $(TEST_ARGS) # Allow overriding the e2e configurations -GINKGO_FOCUS ?= "Workload cluster creation" -GINKGO_SKIP ?= "API Version Upgrade" +GINKGO_FOCUS ?= Workload cluster creation +GINKGO_SKIP ?= API Version Upgrade GINKGO_NODES ?= 1 GINKGO_NOCOLOR ?= false GINKGO_ARGS ?= diff --git a/test/e2e/conformance_test.go b/test/e2e/conformance_test.go index acb4a2689..08356d7b9 100644 --- a/test/e2e/conformance_test.go +++ b/test/e2e/conformance_test.go @@ -93,7 +93,7 @@ var _ = Describe("Conformance Tests", func() { dumpSpecResourcesAndCleanup(ctx, cleanInput) }) - Measure(specName, func(b Benchmarker) { + It("Should run conformance tests", func() { var err error kubernetesVersion := e2eConfig.GetVariable(capi_e2e.KubernetesVersion) @@ -114,44 +114,38 @@ var _ = Describe("Conformance Tests", func() { controlPlaneMachineCount, err := strconv.ParseInt(e2eConfig.GetVariable("CONFORMANCE_CONTROL_PLANE_MACHINE_COUNT"), 10, 64) Expect(err).NotTo(HaveOccurred()) - runtime := b.Time("cluster creation", func() { - clusterctl.ApplyClusterTemplateAndWait(ctx, clusterctl.ApplyClusterTemplateAndWaitInput{ - ClusterProxy: bootstrapClusterProxy, - ConfigCluster: clusterctl.ConfigClusterInput{ - LogFolder: clusterctlLogFolder, - ClusterctlConfigPath: clusterctlConfigPath, - KubeconfigPath: bootstrapClusterProxy.GetKubeconfigPath(), - InfrastructureProvider: clusterctl.DefaultInfrastructureProvider, - Flavor: flavor, - Namespace: namespace.Name, - ClusterName: clusterName, - KubernetesVersion: kubernetesVersion, - ControlPlaneMachineCount: pointer.Int64Ptr(controlPlaneMachineCount), - WorkerMachineCount: pointer.Int64Ptr(workerMachineCount), - }, - WaitForClusterIntervals: e2eConfig.GetIntervals(specName, "wait-cluster"), - WaitForControlPlaneIntervals: e2eConfig.GetIntervals(specName, "wait-control-plane"), - WaitForMachineDeployments: e2eConfig.GetIntervals(specName, "wait-worker-nodes"), - }, result) - }) - - b.RecordValue("cluster creation", runtime.Seconds()) + By("Initializes the work cluster") + clusterctl.ApplyClusterTemplateAndWait(ctx, clusterctl.ApplyClusterTemplateAndWaitInput{ + ClusterProxy: bootstrapClusterProxy, + ConfigCluster: clusterctl.ConfigClusterInput{ + LogFolder: clusterctlLogFolder, + ClusterctlConfigPath: clusterctlConfigPath, + KubeconfigPath: bootstrapClusterProxy.GetKubeconfigPath(), + InfrastructureProvider: clusterctl.DefaultInfrastructureProvider, + Flavor: flavor, + Namespace: namespace.Name, + ClusterName: clusterName, + KubernetesVersion: kubernetesVersion, + ControlPlaneMachineCount: pointer.Int64Ptr(controlPlaneMachineCount), + WorkerMachineCount: pointer.Int64Ptr(workerMachineCount), + }, + WaitForClusterIntervals: e2eConfig.GetIntervals(specName, "wait-cluster"), + WaitForControlPlaneIntervals: e2eConfig.GetIntervals(specName, "wait-control-plane"), + WaitForMachineDeployments: e2eConfig.GetIntervals(specName, "wait-worker-nodes"), + }, result) + workloadProxy := bootstrapClusterProxy.GetWorkloadCluster(ctx, namespace.Name, clusterName) - ginkgoNodes, err := strconv.Atoi(e2eConfig.GetVariable("CONFORMANCE_NODES")) Expect(err).NotTo(HaveOccurred()) - runtime = b.Time("conformance suite", func() { - kubetest.Run(context.Background(), - kubetest.RunInput{ - ClusterProxy: workloadProxy, - NumberOfNodes: int(workerMachineCount), - ConfigFilePath: kubetestConfigFilePath, - KubeTestRepoListPath: repoList, - GinkgoNodes: ginkgoNodes, - }, - ) - }) - b.RecordValue("conformance suite run time", runtime.Seconds()) - }, 1) + kubetest.Run(context.Background(), + kubetest.RunInput{ + ClusterProxy: workloadProxy, + NumberOfNodes: int(workerMachineCount), + ConfigFilePath: kubetestConfigFilePath, + KubeTestRepoListPath: repoList, + GinkgoNodes: ginkgoNodes, + }, + ) + } })