@@ -172,7 +172,7 @@ func TestControlPlane(t *testing.T) {
172172 Spec : clusterv1.MachineSpec {
173173 Version : ptr .To ("v1.31.0" ), // deleted
174174 FailureDomain : ptr .To ("one" ),
175- InfrastructureRef : corev1.ObjectReference {Kind : "GenericInfrastructureMachine" , APIVersion : "infrastructure.cluster.x-k8s.io/v1beta1" , Name : "m1" },
175+ InfrastructureRef : corev1.ObjectReference {Kind : "GenericInfrastructureMachine" , APIVersion : clusterv1 . GroupVersionInfrastructure . String () , Name : "m1" },
176176 }},
177177 }
178178 controlPlane , err := NewControlPlane (ctx , nil , env .GetClient (), & cluster , kcp , machines )
@@ -223,7 +223,7 @@ func TestControlPlane(t *testing.T) {
223223 infraMachine := & unstructured.Unstructured {
224224 Object : map [string ]interface {}{
225225 "kind" : "GenericInfrastructureMachine" ,
226- "apiVersion" : "infrastructure.cluster.x-k8s.io/v1beta1" ,
226+ "apiVersion" : clusterv1 . GroupVersionInfrastructure . String () ,
227227 "metadata" : map [string ]interface {}{
228228 "name" : "infra-config1" ,
229229 "namespace" : ns .Name ,
@@ -296,7 +296,7 @@ func TestControlPlane(t *testing.T) {
296296 Namespace : ns .Name },
297297 Spec : clusterv1.MachineSpec {
298298 InfrastructureRef : corev1.ObjectReference {
299- APIVersion : "infrastructure.cluster.x-k8s.io/v1beta1" ,
299+ APIVersion : clusterv1 . GroupVersionInfrastructure . String () ,
300300 Kind : "GenericInfrastructureMachine" ,
301301 Name : "infra-config1" ,
302302 Namespace : ns .Name ,
0 commit comments