From 1d3feb9532b3a78359a9f246639243c0fb0833e6 Mon Sep 17 00:00:00 2001 From: Gong Zhang Date: Mon, 20 May 2024 16:31:45 +0800 Subject: [PATCH] Fill up supervisor e2e test - testing ClusterClass changes Signed-off-by: Gong Zhang --- test/e2e/clusterclass_changes_test.go | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/test/e2e/clusterclass_changes_test.go b/test/e2e/clusterclass_changes_test.go index b4c9a31e9f..c07265a5ea 100644 --- a/test/e2e/clusterclass_changes_test.go +++ b/test/e2e/clusterclass_changes_test.go @@ -21,11 +21,11 @@ import ( capie2e "sigs.k8s.io/cluster-api/test/e2e" ) -var _ = Describe("When testing ClusterClass changes [ClusterClass]", func() { +var _ = Describe("When testing ClusterClass changes [supervisor] [ClusterClass]", func() { const specName = "clusterclass-changes" // copied from CAPI Setup(specName, func(testSpecificSettingsGetter func() testSettings) { capie2e.ClusterClassChangesSpec(ctx, func() capie2e.ClusterClassChangesSpecInput { - return capie2e.ClusterClassChangesSpecInput{ + clusterClassChangesSpecInput := capie2e.ClusterClassChangesSpecInput{ E2EConfig: e2eConfig, ClusterctlConfigPath: testSpecificSettingsGetter().ClusterctlConfigPath, BootstrapClusterProxy: bootstrapClusterProxy, @@ -34,15 +34,25 @@ var _ = Describe("When testing ClusterClass changes [ClusterClass]", func() { Flavor: testSpecificSettingsGetter().FlavorForMode("topology"), PostNamespaceCreated: testSpecificSettingsGetter().PostNamespaceCreatedFunc, ModifyControlPlaneFields: map[string]interface{}{ - "spec.machineTemplate.nodeDrainTimeout": "10s", + "spec.kubeadmConfigSpec.verbosity": int64(4), }, ModifyMachineDeploymentBootstrapConfigTemplateFields: map[string]interface{}{ "spec.template.spec.verbosity": int64(4), }, - ModifyMachineDeploymentInfrastructureMachineTemplateFields: map[string]interface{}{ + } + + if testMode == GovmomiTestMode { + clusterClassChangesSpecInput.ModifyMachineDeploymentInfrastructureMachineTemplateFields = map[string]interface{}{ "spec.template.spec.numCPUs": int64(4), - }, + } + } + + if testMode == SupervisorTestMode { + clusterClassChangesSpecInput.ModifyMachineDeploymentInfrastructureMachineTemplateFields = map[string]interface{}{ + "spec.template.spec.powerOffMode": "trySoft", + } } + return clusterClassChangesSpecInput }) }) })