@@ -174,7 +174,7 @@ func TestControlPlane(t *testing.T) {
174174 Spec : clusterv1.MachineSpec {
175175 Version : ptr .To ("v1.31.0" ), // deleted
176176 FailureDomain : ptr .To ("one" ),
177- InfrastructureRef : corev1.ObjectReference {Kind : "GenericInfrastructureMachine" , APIVersion : "infrastructure.cluster.x-k8s.io/v1beta1" , Name : "m1" },
177+ InfrastructureRef : corev1.ObjectReference {Kind : "GenericInfrastructureMachine" , APIVersion : clusterv1 . GroupVersionInfrastructure . String () , Name : "m1" },
178178 }},
179179 }
180180 controlPlane , err := NewControlPlane (ctx , nil , env .GetClient (), & cluster , kcp , machines )
@@ -225,7 +225,7 @@ func TestControlPlane(t *testing.T) {
225225 infraMachine := & unstructured.Unstructured {
226226 Object : map [string ]interface {}{
227227 "kind" : "GenericInfrastructureMachine" ,
228- "apiVersion" : "infrastructure.cluster.x-k8s.io/v1beta1" ,
228+ "apiVersion" : clusterv1 . GroupVersionInfrastructure . String () ,
229229 "metadata" : map [string ]interface {}{
230230 "name" : "infra-config1" ,
231231 "namespace" : ns .Name ,
@@ -298,7 +298,7 @@ func TestControlPlane(t *testing.T) {
298298 Namespace : ns .Name },
299299 Spec : clusterv1.MachineSpec {
300300 InfrastructureRef : corev1.ObjectReference {
301- APIVersion : "infrastructure.cluster.x-k8s.io/v1beta1" ,
301+ APIVersion : clusterv1 . GroupVersionInfrastructure . String () ,
302302 Kind : "GenericInfrastructureMachine" ,
303303 Name : "infra-config1" ,
304304 Namespace : ns .Name ,
0 commit comments