Skip to content

Commit

Permalink
Fill up supervisor e2e test
Browse files Browse the repository at this point in the history
- testing ClusterClass changes

Signed-off-by: Gong Zhang <[email protected]>
  • Loading branch information
zhanggbj committed May 28, 2024
1 parent 3bd6c93 commit 1d3feb9
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions test/e2e/clusterclass_changes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
})
})
})

0 comments on commit 1d3feb9

Please sign in to comment.