Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanato committed Nov 28, 2022
1 parent affe67c commit 513caa3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 39 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?=
Expand Down
68 changes: 31 additions & 37 deletions test/e2e/conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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,
},
)
})
})

0 comments on commit 513caa3

Please sign in to comment.