diff --git a/tests/e2e/network/standard_lb.go b/tests/e2e/network/standard_lb.go index 9b5da620a1..6da52058bd 100644 --- a/tests/e2e/network/standard_lb.go +++ b/tests/e2e/network/standard_lb.go @@ -161,7 +161,9 @@ var _ = Describe("[StandardLoadBalancer] Standard load balancer", func() { } } } - Expect(len(outboundRuleIPs)).NotTo(Equal(0)) + if len(outboundRuleIPs) == 0 { + Skip("skip validating outbound IPs since outbound rules are not configured on SLB") + } podTemplate := createPodGetIP() err = utils.CreatePod(cs, ns.Name, podTemplate) diff --git a/tests/e2e/utils/network_utils.go b/tests/e2e/utils/network_utils.go index 9f540cb8c8..e12651ab3d 100644 --- a/tests/e2e/utils/network_utils.go +++ b/tests/e2e/utils/network_utils.go @@ -240,7 +240,7 @@ func SelectAvailablePrivateIP(tc *AzureTestClient) (string, error) { if len(*vNet.Subnets) > 1 { for _, sn := range *vNet.Subnets { // if there is more than one subnet, select the first one we find. - if !strings.Contains(*sn.Name, "controlplane") { + if !strings.Contains(*sn.Name, "controlplane") && !strings.Contains(*sn.Name, "control-plane") { subnet = *sn.AddressPrefix break }