@@ -911,6 +911,53 @@ func Test_SpecStatusSynchronizer(t *testing.T) {
911911 },
912912 },
913913 },
914+ {
915+ name : "should handle vSphere UPI: empty unset apiServerInternalIPs and ingressIPs" ,
916+ givenInfra : configv1.Infrastructure {
917+ ObjectMeta : metav1.ObjectMeta {Name : "cluster" },
918+ Spec : configv1.InfrastructureSpec {
919+ PlatformSpec : configv1.PlatformSpec {
920+ VSphere : & configv1.VSpherePlatformSpec {
921+ APIServerInternalIPs : []configv1.IP {},
922+ IngressIPs : []configv1.IP {},
923+ MachineNetworks : []configv1.CIDR {"224.0.0.1/24" , "224.0.1.1/24" },
924+ },
925+ },
926+ },
927+ Status : configv1.InfrastructureStatus {
928+ Platform : configv1 .VSpherePlatformType ,
929+ PlatformStatus : & configv1.PlatformStatus {
930+ Type : "VSphere" ,
931+ VSphere : & configv1.VSpherePlatformStatus {
932+ MachineNetworks : []configv1.CIDR {"224.0.0.1/24" , "224.0.1.1/24" },
933+ },
934+ },
935+ },
936+ },
937+ wantedInfra : configv1.Infrastructure {
938+ ObjectMeta : metav1.ObjectMeta {Name : "cluster" },
939+ Spec : configv1.InfrastructureSpec {
940+ PlatformSpec : configv1.PlatformSpec {
941+ VSphere : & configv1.VSpherePlatformSpec {
942+ APIServerInternalIPs : []configv1.IP {},
943+ IngressIPs : []configv1.IP {},
944+ MachineNetworks : []configv1.CIDR {"224.0.0.1/24" , "224.0.1.1/24" },
945+ },
946+ },
947+ },
948+ Status : configv1.InfrastructureStatus {
949+ Platform : configv1 .VSpherePlatformType ,
950+ PlatformStatus : & configv1.PlatformStatus {
951+ Type : "VSphere" ,
952+ VSphere : & configv1.VSpherePlatformStatus {
953+ APIServerInternalIPs : []string {},
954+ IngressIPs : []string {},
955+ MachineNetworks : []configv1.CIDR {"224.0.0.1/24" , "224.0.1.1/24" },
956+ },
957+ },
958+ },
959+ },
960+ },
914961 }
915962
916963 for _ , tt := range tests {
0 commit comments