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 24, 2024
1 parent 3bd6c93 commit 0a8d2c4
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 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,7 +34,7 @@ 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),
Expand All @@ -43,6 +43,15 @@ var _ = Describe("When testing ClusterClass changes [ClusterClass]", func() {
"spec.template.spec.numCPUs": int64(4),
},
}
if testMode == GovmomiTestMode {
clusterClassChangesSpecInput.ModifyMachineDeploymentInfrastructureMachineTemplateFields = map[string]interface{}{
"spec.template.spec.numCPUs": int64(4),
}
}
clusterClassChangesSpecInput.ModifyMachineDeploymentInfrastructureMachineTemplateFields = map[string]interface{}{
"spec.template.spec.powerOffMode": "hard",
}
return clusterClassChangesSpecInput
})
})
})

0 comments on commit 0a8d2c4

Please sign in to comment.