Skip to content

Commit

Permalink
Add unit test to switch shoot from no-HA to HA
Browse files Browse the repository at this point in the history
  • Loading branch information
koala7659 committed Jan 23, 2025
1 parent a2fbe12 commit 6409f92
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions pkg/gardener/shoot/extender/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,33 @@ func TestProviderExtenderForPatchWorkersUpdateAWS(t *testing.T) {
ExistingInfraConfig: fixAWSInfrastructureConfig("10.250.0.0/22", []string{"eu-central-1a", "eu-central-1b", "eu-central-1c"}),
ExistingControlPlaneConfig: fixAWSControlPlaneConfig(),
},
/*"Add additional worker - extend existing additional worker from non HA setup to HA setup by adding more zones, infrastructureConfig already has three zones": {
Runtime: imv1.Runtime{
Spec: imv1.RuntimeSpec{
Shoot: imv1.RuntimeShoot{
Provider: fixProviderWithMultipleWorkers(hyperscaler.TypeAWS, fixMultipleWorkers([]workerConfig{
{"main-worker", "m6i.large", "gardenlinux", "1312.4.0", 1, 3, []string{"eu-central-1a", "eu-central-1b", "eu-central-1c"}},
{"additional", "m6i.large", "gardenlinux", "1312.2.0", 1, 3, []string{"eu-central-1a"}},
})),
Networking: imv1.Networking{
Nodes: "10.250.0.0/22",
},
},
},
},
EnableIMDSv2: false,
DefaultMachineImageName: "gardenlinux",
DefaultMachineImageVersion: "1312.3.0",
ExpectedZonesCount: 3,
CurrentShootWorkers: fixMultipleWorkers([]workerConfig{
{"main-worker", "m6i.large", "gardenlinux", "1312.4.0", 1, 3, []string{"eu-central-1a", "eu-central-1b", "eu-central-1c"}},
{"additional", "m6i.large", "gardenlinux", "1312.2.0", 1, 3, []string{"eu-central-1a"}}}),
ExpectedShootWorkers: fixMultipleWorkers([]workerConfig{
{"main-worker", "m6i.large", "gardenlinux", "1312.4.0", 1, 3, []string{"eu-central-1a", "eu-central-1b", "eu-central-1c"}},
{"additional", "m6i.large", "gardenlinux", "1312.2.0", 1, 3, []string{"eu-central-1a", "eu-central-1b", "eu-central-1c"}}}),
ExistingInfraConfig: fixAWSInfrastructureConfig("10.250.0.0/22", []string{"eu-central-1a", "eu-central-1b", "eu-central-1c"}),
ExistingControlPlaneConfig: fixAWSControlPlaneConfig(),
},*/
"Remove additional worker from existing set of workers": {
Runtime: imv1.Runtime{
Spec: imv1.RuntimeSpec{
Expand Down

0 comments on commit 6409f92

Please sign in to comment.