Skip to content

Commit 2664a38

Browse files
committed
e2e: add v1beta1 CAPI scheme to clients and adjust modifyFunc test to use the new field name
1 parent 8596a85 commit 2664a38

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

test/e2e/shared/defaults.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ import (
3030
cgscheme "k8s.io/client-go/kubernetes/scheme"
3131

3232
infrav1 "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2"
33+
bootstrapv1beta1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1"
34+
controlplanev1beta1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta1"
35+
clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
3336
"sigs.k8s.io/cluster-api/test/framework"
3437
)
3538

@@ -221,6 +224,12 @@ func getLimitedResources() map[string]*ServiceQuota {
221224
func DefaultScheme() *runtime.Scheme {
222225
sc := runtime.NewScheme()
223226
framework.TryAddDefaultSchemes(sc)
227+
228+
// Temporary add v1beta1 scheme as long as the e2e tests use v1beta1 templates
229+
clusterv1beta1.AddToScheme(sc)
230+
bootstrapv1beta1.AddToScheme(sc)
231+
controlplanev1beta1.AddToScheme(sc)
232+
224233
_ = infrav1.AddToScheme(sc)
225234
_ = cgscheme.AddToScheme(sc)
226235
return sc

test/e2e/suites/unmanaged/unmanaged_CAPI_clusterclass_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ var _ = ginkgo.Context("[unmanaged] [Cluster API Framework] [ClusterClass]", fun
117117
// ControlPlaneTemplate of the ClusterClass after the initial Cluster creation.
118118
// The test verifies that these fields are rolled out to the ControlPlane.
119119
ModifyControlPlaneFields: map[string]interface{}{
120-
"spec.machineTemplate.nodeDrainTimeout": "10s",
120+
"spec.machineTemplate.nodeDrainTimeoutSeconds": "10s",
121121
},
122122
// ModifyMachineDeploymentBootstrapConfigTemplateFields are the fields which will be set on the
123123
// BootstrapConfigTemplate of all MachineDeploymentClasses of the ClusterClass after the initial Cluster creation.

0 commit comments

Comments
 (0)