Skip to content

Commit

Permalink
tests adjusted for preview provider change
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroslaw-pieszka committed Aug 7, 2024
1 parent ca80877 commit e1a21f9
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions internal/process/provisioning/create_runtime_resource_step_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_SingleZone_ActualCreation(t

err := imv1.AddToScheme(scheme.Scheme)

instance, operation := fixInstanceAndOperation(broker.PreviewPlanID, "eu-west-2", "platform-region")
instance, operation := fixInstanceAndOperation(broker.PreviewPlanID, "westeurope", "platform-region")
assertInsertions(t, memoryStorage, instance, operation)

kimConfig := fixKimConfig("preview", false)
Expand Down Expand Up @@ -459,10 +459,10 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_SingleZone_ActualCreation(t
assertLabelsKIMDriven(t, operation, runtime)
assertSecurity(t, runtime)

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "azure", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "westeurope", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "m6i.large", 20, 3, 1, 0, 1, []string{"eu-west-2a", "eu-west-2b", "eu-west-2c"})
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "Standard_D2s_v5", 20, 3, 1, 0, 1, []string{"1", "2", "3"})

_, err = memoryStorage.Instances().GetByID(operation.InstanceID)
assert.NoError(t, err)
Expand All @@ -476,7 +476,7 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_SingleZone_ActualCreation_Wi

err := imv1.AddToScheme(scheme.Scheme)

instance, operation := fixInstanceAndOperation(broker.PreviewPlanID, "eu-west-2", "platform-region")
instance, operation := fixInstanceAndOperation(broker.PreviewPlanID, "westeurope", "platform-region")
assertInsertions(t, memoryStorage, instance, operation)

kimConfig := fixKimConfig("preview", false)
Expand Down Expand Up @@ -505,10 +505,10 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_SingleZone_ActualCreation_Wi
assertLabelsKIMDriven(t, operation, runtime)
assertSecurity(t, runtime)

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "azure", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "westeurope", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "m6i.large", 20, 3, 1, 0, 1, []string{"eu-west-2a", "eu-west-2b", "eu-west-2c"})
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "Standard_D2s_v5", 20, 3, 1, 0, 1, []string{"1", "2", "3"})

// then retry
_, repeat, err = step.Run(operation, entry)
Expand All @@ -525,10 +525,10 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_SingleZone_ActualCreation_Wi
assertLabelsKIMDriven(t, operation, runtime)
assertSecurity(t, runtime)

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "azure", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "westeurope", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "m6i.large", 20, 3, 1, 0, 1, []string{"eu-west-2a", "eu-west-2b", "eu-west-2c"})
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "Standard_D2s_v5", 20, 3, 1, 0, 1, []string{"1", "2", "3"})

_, err = memoryStorage.Instances().GetByID(operation.InstanceID)
assert.NoError(t, err)
Expand All @@ -542,7 +542,7 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_MultiZone_ActualCreation(t *

err := imv1.AddToScheme(scheme.Scheme)

instance, operation := fixInstanceAndOperation(broker.PreviewPlanID, "eu-west-2", "platform-region")
instance, operation := fixInstanceAndOperation(broker.PreviewPlanID, "westeurope", "platform-region")
assertInsertions(t, memoryStorage, instance, operation)

kimConfig := fixKimConfig("preview", false)
Expand Down Expand Up @@ -571,10 +571,10 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_MultiZone_ActualCreation(t *
assertLabelsKIMDriven(t, operation, runtime)
assertSecurity(t, runtime)

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "azure", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "westeurope", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "m6i.large", 20, 3, 3, 0, 3, []string{"eu-west-2a", "eu-west-2b", "eu-west-2c"})
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "Standard_D2s_v5", 20, 3, 3, 0, 3, []string{"1", "2", "3"})

_, err = memoryStorage.Instances().GetByID(operation.InstanceID)
assert.NoError(t, err)
Expand Down

0 comments on commit e1a21f9

Please sign in to comment.