Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Frey committed Sep 6, 2023
1 parent 7b90692 commit 7a2295d
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions internal/controllers/topology/cluster/patches/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ func TestApply(t *testing.T) {
MachineDeploymentClass: &clusterv1.PatchSelectorMatchMachineDeploymentClass{
Names: []string{"default-worker"},
},
MachinePoolClass: &clusterv1.PatchSelectorMatchMachinePoolClass{
Names: []string{"default-mp-worker"},
},
},
},
JSONPatches: []clusterv1.JSONPatch{
Expand All @@ -194,7 +191,7 @@ func TestApply(t *testing.T) {
{
Op: "add",
Path: "/spec/template/spec/resource",
Value: &apiextensionsv1.JSON{Raw: []byte(`"default-worker-infra"`)},
Value: &apiextensionsv1.JSON{Raw: []byte(`"default-mp-worker-infra"`)},
},
},
},
Expand All @@ -212,7 +209,7 @@ func TestApply(t *testing.T) {
{
Op: "add",
Path: "/spec/template/spec/resource",
Value: &apiextensionsv1.JSON{Raw: []byte(`"default-worker-bootstrap"`)},
Value: &apiextensionsv1.JSON{Raw: []byte(`"default-mp-worker-bootstrap"`)},
},
},
},
Expand All @@ -229,12 +226,12 @@ func TestApply(t *testing.T) {
"default-worker-topo2": {"spec.template.spec.resource": "default-worker-infra"},
},
machinePoolBootstrapConfig: map[string]map[string]interface{}{
"default-mp-worker-topo1": {"spec.resource": "default-worker-bootstrap"},
"default-mp-worker-topo2": {"spec.resource": "default-worker-bootstrap"},
"default-mp-worker-topo1": {"spec.resource": "default-mp-worker-bootstrap"},
"default-mp-worker-topo2": {"spec.resource": "default-mp-worker-bootstrap"},
},
machinePoolInfrastructureMachinePool: map[string]map[string]interface{}{
"default-mp-worker-topo1": {"spec.resource": "default-worker-infra"},
"default-mp-worker-topo2": {"spec.resource": "default-worker-infra"},
"default-mp-worker-topo1": {"spec.resource": "default-mp-worker-infra"},
"default-mp-worker-topo2": {"spec.resource": "default-mp-worker-infra"},
},
},
},
Expand Down Expand Up @@ -850,11 +847,11 @@ func TestApply(t *testing.T) {
"default-worker-topo2": {"spec.template.spec.resource": "default-worker-topo2"},
},
machinePoolInfrastructureMachinePool: map[string]map[string]interface{}{
"default-mp-worker-topo1": {"spec.resource": "value1"},
"default-mp-worker-topo1": {"spec.resource": "value2"},
"default-mp-worker-topo2": {"spec.resource": "default-mp-worker-topo2"},
},
machinePoolBootstrapConfig: map[string]map[string]interface{}{
"default-mp-worker-topo1": {"spec.resource": "value1"},
"default-mp-worker-topo1": {"spec.resource": "value2"},
"default-mp-worker-topo2": {"spec.resource": "default-mp-worker-topo2"},
},
},
Expand Down Expand Up @@ -1105,7 +1102,7 @@ func setupTestObjects() (*scope.ClusterBlueprint, *scope.ClusterState) {
{
Name: "default-mp-worker-infra",
DefinitionFrom: "inline",
Value: apiextensionsv1.JSON{Raw: []byte(`"value1"`)},
Value: apiextensionsv1.JSON{Raw: []byte(`"value2"`)},
},
},
},
Expand Down

0 comments on commit 7a2295d

Please sign in to comment.