@@ -28,7 +28,6 @@ import (
2828 . "github.com/onsi/ginkgo/v2"
2929 . "github.com/onsi/gomega"
3030 corev1 "k8s.io/api/core/v1"
31- apierrors "k8s.io/apimachinery/pkg/api/errors"
3231 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3332 "k8s.io/utils/ptr"
3433 clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
@@ -129,21 +128,21 @@ func AKSPublicIPPrefixSpec(ctx context.Context, inputGetter func() AKSPublicIPPr
129128 err = mgmtClient .Create (ctx , machinePool )
130129 Expect (err ).NotTo (HaveOccurred ())
131130
132- defer func () {
133- By ("Deleting the node pool" )
134- err := mgmtClient .Delete (ctx , machinePool )
135- Expect (err ).NotTo (HaveOccurred ())
136-
137- Eventually (func (g Gomega ) {
138- err := mgmtClient .Get (ctx , client .ObjectKeyFromObject (machinePool ), & expv1.MachinePool {})
139- g .Expect (apierrors .IsNotFound (err )).To (BeTrue ())
140- }, input .WaitIntervals ... ).Should (Succeed (), "Deleted MachinePool %s/%s still exists" , machinePool .Namespace , machinePool .Name )
141-
142- Eventually (func (g Gomega ) {
143- err := mgmtClient .Get (ctx , client .ObjectKeyFromObject (infraMachinePool ), & infrav1.AzureManagedMachinePool {})
144- g .Expect (apierrors .IsNotFound (err )).To (BeTrue ())
145- }, input .WaitIntervals ... ).Should (Succeed (), "Deleted AzureManagedMachinePool %s/%s still exists" , infraMachinePool .Namespace , infraMachinePool .Name )
146- }()
131+ // defer func() {
132+ // By("Deleting the node pool")
133+ // err := mgmtClient.Delete(ctx, machinePool)
134+ // Expect(err).NotTo(HaveOccurred())
135+ //
136+ // Eventually(func(g Gomega) {
137+ // err := mgmtClient.Get(ctx, client.ObjectKeyFromObject(machinePool), &expv1.MachinePool{})
138+ // g.Expect(apierrors.IsNotFound(err)).To(BeTrue())
139+ // }, input.WaitIntervals...).Should(Succeed(), "Deleted MachinePool %s/%s still exists", machinePool.Namespace, machinePool.Name)
140+ //
141+ // Eventually(func(g Gomega) {
142+ // err := mgmtClient.Get(ctx, client.ObjectKeyFromObject(infraMachinePool), &infrav1.AzureManagedMachinePool{})
143+ // g.Expect(apierrors.IsNotFound(err)).To(BeTrue())
144+ // }, input.WaitIntervals...).Should(Succeed(), "Deleted AzureManagedMachinePool %s/%s still exists", infraMachinePool.Namespace, infraMachinePool.Name)
145+ // }()
147146
148147 By ("Verifying the AzureManagedMachinePool converges to a failed ready status" )
149148 Eventually (func (g Gomega ) {
0 commit comments