Skip to content

Commit 7a2295d

Browse files
author
Johannes Frey
committed
Apply suggestions from code review
1 parent 7b90692 commit 7a2295d

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

internal/controllers/topology/cluster/patches/engine_test.go

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,6 @@ func TestApply(t *testing.T) {
167167
MachineDeploymentClass: &clusterv1.PatchSelectorMatchMachineDeploymentClass{
168168
Names: []string{"default-worker"},
169169
},
170-
MachinePoolClass: &clusterv1.PatchSelectorMatchMachinePoolClass{
171-
Names: []string{"default-mp-worker"},
172-
},
173170
},
174171
},
175172
JSONPatches: []clusterv1.JSONPatch{
@@ -194,7 +191,7 @@ func TestApply(t *testing.T) {
194191
{
195192
Op: "add",
196193
Path: "/spec/template/spec/resource",
197-
Value: &apiextensionsv1.JSON{Raw: []byte(`"default-worker-infra"`)},
194+
Value: &apiextensionsv1.JSON{Raw: []byte(`"default-mp-worker-infra"`)},
198195
},
199196
},
200197
},
@@ -212,7 +209,7 @@ func TestApply(t *testing.T) {
212209
{
213210
Op: "add",
214211
Path: "/spec/template/spec/resource",
215-
Value: &apiextensionsv1.JSON{Raw: []byte(`"default-worker-bootstrap"`)},
212+
Value: &apiextensionsv1.JSON{Raw: []byte(`"default-mp-worker-bootstrap"`)},
216213
},
217214
},
218215
},
@@ -229,12 +226,12 @@ func TestApply(t *testing.T) {
229226
"default-worker-topo2": {"spec.template.spec.resource": "default-worker-infra"},
230227
},
231228
machinePoolBootstrapConfig: map[string]map[string]interface{}{
232-
"default-mp-worker-topo1": {"spec.resource": "default-worker-bootstrap"},
233-
"default-mp-worker-topo2": {"spec.resource": "default-worker-bootstrap"},
229+
"default-mp-worker-topo1": {"spec.resource": "default-mp-worker-bootstrap"},
230+
"default-mp-worker-topo2": {"spec.resource": "default-mp-worker-bootstrap"},
234231
},
235232
machinePoolInfrastructureMachinePool: map[string]map[string]interface{}{
236-
"default-mp-worker-topo1": {"spec.resource": "default-worker-infra"},
237-
"default-mp-worker-topo2": {"spec.resource": "default-worker-infra"},
233+
"default-mp-worker-topo1": {"spec.resource": "default-mp-worker-infra"},
234+
"default-mp-worker-topo2": {"spec.resource": "default-mp-worker-infra"},
238235
},
239236
},
240237
},
@@ -850,11 +847,11 @@ func TestApply(t *testing.T) {
850847
"default-worker-topo2": {"spec.template.spec.resource": "default-worker-topo2"},
851848
},
852849
machinePoolInfrastructureMachinePool: map[string]map[string]interface{}{
853-
"default-mp-worker-topo1": {"spec.resource": "value1"},
850+
"default-mp-worker-topo1": {"spec.resource": "value2"},
854851
"default-mp-worker-topo2": {"spec.resource": "default-mp-worker-topo2"},
855852
},
856853
machinePoolBootstrapConfig: map[string]map[string]interface{}{
857-
"default-mp-worker-topo1": {"spec.resource": "value1"},
854+
"default-mp-worker-topo1": {"spec.resource": "value2"},
858855
"default-mp-worker-topo2": {"spec.resource": "default-mp-worker-topo2"},
859856
},
860857
},
@@ -1105,7 +1102,7 @@ func setupTestObjects() (*scope.ClusterBlueprint, *scope.ClusterState) {
11051102
{
11061103
Name: "default-mp-worker-infra",
11071104
DefinitionFrom: "inline",
1108-
Value: apiextensionsv1.JSON{Raw: []byte(`"value1"`)},
1105+
Value: apiextensionsv1.JSON{Raw: []byte(`"value2"`)},
11091106
},
11101107
},
11111108
},

0 commit comments

Comments
 (0)