@@ -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/pointer"
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"
@@ -86,6 +87,7 @@ func AKSAdditionalTagsSpec(ctx context.Context, inputGetter func() AKSAdditional
8687 checkTags := func (g Gomega ) {
8788 managedcluster , err := managedclustersClient .Get (ctx , infraControlPlane .Spec .ResourceGroupName , infraControlPlane .Name )
8889 g .Expect (err ).NotTo (HaveOccurred ())
90+ g .Expect (managedcluster .ProvisioningState ).To (Equal (pointer .String ("Succeeded" )))
8991 actualTags := converters .MapToTags (managedcluster .Tags )
9092 // Ignore tags not originally specified in spec.additionalTags
9193 for k := range nonAdditionalTagKeys {
@@ -170,6 +172,7 @@ func AKSAdditionalTagsSpec(ctx context.Context, inputGetter func() AKSAdditional
170172 checkTags := func (g Gomega ) {
171173 agentpool , err := agentpoolsClient .Get (ctx , infraControlPlane .Spec .ResourceGroupName , infraControlPlane .Name , * ammp .Spec .Name )
172174 g .Expect (err ).NotTo (HaveOccurred ())
175+ g .Expect (agentpool .ProvisioningState ).To (Equal (pointer .String ("Succeeded" )))
173176 actualTags := converters .MapToTags (agentpool .Tags )
174177 // Ignore tags not originally specified in spec.additionalTags
175178 for k := range nonAdditionalTagKeys {
0 commit comments