Skip to content

Commit

Permalink
Bootstrap config object
Browse files Browse the repository at this point in the history
  • Loading branch information
willie-yao committed Nov 11, 2023
1 parent 990f115 commit 4564e25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions test/e2e/clusterclass_changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ type modifyMachinePoolViaClusterClassAndWaitInput struct {
ClusterProxy framework.ClusterProxy
ClusterClass *clusterv1.ClusterClass
Cluster *clusterv1.Cluster
ModifyBootstrapConfigTemplateFields map[string]interface{}
ModifyBootstrapConfigObjectFields map[string]interface{}
ModifyInfrastructureMachinePoolTemplateFields map[string]interface{}
WaitForMachinePools []interface{}
}
Expand Down Expand Up @@ -464,7 +464,7 @@ func modifyMachinePoolViaClusterClassAndWait(ctx context.Context, input modifyMa
newBootstrapConfigTemplateName = fmt.Sprintf("%s-%s", bootstrapConfigTemplateRef.Name, util.RandomString(6))
newBootstrapConfigTemplate.SetName(newBootstrapConfigTemplateName)
newBootstrapConfigTemplate.SetResourceVersion("")
for fieldPath, value := range input.ModifyBootstrapConfigTemplateFields {
for fieldPath, value := range input.ModifyBootstrapConfigObjectFields {
Expect(unstructured.SetNestedField(newBootstrapConfigTemplate.Object, value, strings.Split(fieldPath, ".")...)).To(Succeed())
}
Expect(mgmtClient.Create(ctx, newBootstrapConfigTemplate)).To(Succeed())
Expand Down Expand Up @@ -524,7 +524,7 @@ func modifyMachinePoolViaClusterClassAndWait(ctx context.Context, input modifyMa
g.Expect(err).ToNot(HaveOccurred())

// Verify that ModifyBootstrapConfigTemplateFields have been set.
for fieldPath, expectedValue := range input.ModifyBootstrapConfigTemplateFields {
for fieldPath, expectedValue := range input.ModifyBootstrapConfigObjectFields {
currentValue, ok, err := unstructured.NestedFieldNoCopy(bootstrapConfigTemplate.Object, strings.Split(fieldPath, ".")...)
g.Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("failed to get field %q", fieldPath))
g.Expect(ok).To(BeTrue(), fmt.Sprintf("failed to get field %q", fieldPath))
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/clusterclass_rollout.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ func ClusterClassRolloutSpec(ctx context.Context, inputGetter func() ClusterClas
ClusterProxy: input.BootstrapClusterProxy,
ClusterClass: clusterResources.ClusterClass,
Cluster: clusterResources.Cluster,
ModifyBootstrapConfigTemplateFields: map[string]interface{}{
"spec.template.spec.verbosity": int64(4),
ModifyBootstrapConfigObjectFields: map[string]interface{}{
"spec.verbosity": int64(4),
},
WaitForMachinePools: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),
})
Expand Down

0 comments on commit 4564e25

Please sign in to comment.