@@ -28,6 +28,7 @@ import (
2828 . "github.com/onsi/ginkgo/v2"
2929 . "github.com/onsi/gomega"
3030 "k8s.io/apimachinery/pkg/types"
31+ "k8s.io/utils/ptr"
3132 infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1"
3233 "sigs.k8s.io/cluster-api-provider-azure/azure/converters"
3334 clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
@@ -83,6 +84,7 @@ func AKSAdditionalTagsSpec(ctx context.Context, inputGetter func() AKSAdditional
8384 checkTags := func (g Gomega ) {
8485 resp , err := managedclustersClient .Get (ctx , infraControlPlane .Spec .ResourceGroupName , infraControlPlane .Name , nil )
8586 g .Expect (err ).NotTo (HaveOccurred ())
87+ g .Expect (resp .Properties .ProvisioningState ).To (Equal (ptr .To ("Succeeded" )))
8688 actualTags := converters .MapToTags (resp .ManagedCluster .Tags )
8789 // Ignore tags not originally specified in spec.additionalTags
8890 for k := range nonAdditionalTagKeys {
@@ -167,6 +169,7 @@ func AKSAdditionalTagsSpec(ctx context.Context, inputGetter func() AKSAdditional
167169 checkTags := func (g Gomega ) {
168170 resp , err := agentpoolsClient .Get (ctx , infraControlPlane .Spec .ResourceGroupName , infraControlPlane .Name , * ammp .Spec .Name , nil )
169171 g .Expect (err ).NotTo (HaveOccurred ())
172+ g .Expect (resp .Properties .ProvisioningState ).To (Equal (ptr .To ("Succeeded" )))
170173 actualTags := converters .MapToTags (resp .AgentPool .Properties .Tags )
171174 // Ignore tags not originally specified in spec.additionalTags
172175 for k := range nonAdditionalTagKeys {
0 commit comments