diff --git a/test/e2e/aks_public_ip_prefix.go b/test/e2e/aks_public_ip_prefix.go index 606008246d7..1e50f18b9b3 100644 --- a/test/e2e/aks_public_ip_prefix.go +++ b/test/e2e/aks_public_ip_prefix.go @@ -84,7 +84,7 @@ func AKSPublicIPPrefixSpec(ctx context.Context, inputGetter func() AKSPublicIPPr publicIPPrefix = resp.PublicIPPrefix }, input.WaitIntervals...).Should(Succeed(), "failed to create public IP prefix") - By("Creating node pool with 3 nodes") + By("Creating node pool with 2 nodes") infraMachinePool := &infrav1.AzureManagedMachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "pool3", @@ -109,7 +109,7 @@ func AKSPublicIPPrefixSpec(ctx context.Context, inputGetter func() AKSPublicIPPr }, Spec: expv1.MachinePoolSpec{ ClusterName: input.Cluster.Name, - Replicas: ptr.To[int32](3), + Replicas: ptr.To[int32](2), Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ @@ -145,27 +145,6 @@ func AKSPublicIPPrefixSpec(ctx context.Context, inputGetter func() AKSPublicIPPr }, input.WaitIntervals...).Should(Succeed(), "Deleted AzureManagedMachinePool %s/%s still exists", infraMachinePool.Namespace, infraMachinePool.Name) }() - By("Verifying the AzureManagedMachinePool converges to a failed ready status") - Eventually(func(g Gomega) { - infraMachinePool := &infrav1.AzureManagedMachinePool{} - err := mgmtClient.Get(ctx, client.ObjectKeyFromObject(machinePool), infraMachinePool) - g.Expect(err).NotTo(HaveOccurred()) - cond := conditions.Get(infraMachinePool, infrav1.AgentPoolsReadyCondition) - g.Expect(cond).NotTo(BeNil()) - g.Expect(cond.Status).To(Equal(corev1.ConditionFalse)) - g.Expect(cond.Reason).To(Equal(infrav1.FailedReason)) - g.Expect(cond.Message).To(ContainSubstring("PublicIpPrefixOutOfIpAddressesForVMScaleSet")) - }, input.WaitIntervals...).Should(Succeed()) - - By("Scaling the MachinePool to 2 nodes") - Eventually(func(g Gomega) { - err = mgmtClient.Get(ctx, client.ObjectKeyFromObject(machinePool), machinePool) - g.Expect(err).NotTo(HaveOccurred()) - machinePool.Spec.Replicas = ptr.To[int32](2) - err = mgmtClient.Update(ctx, machinePool) - g.Expect(err).NotTo(HaveOccurred()) - }, input.WaitIntervals...).Should(Succeed()) - By("Verifying the AzureManagedMachinePool becomes ready") Eventually(func(g Gomega) { infraMachinePool := &infrav1.AzureManagedMachinePool{}