From b806896f7e8efa7f8f2cbf3faee3dc4404443fb3 Mon Sep 17 00:00:00 2001 From: Yun Liu Date: Mon, 10 Oct 2022 22:59:08 -0700 Subject: [PATCH] fix acc test TestAccAzureRMDnsAAAARecord_RecordsToAlias (#18693) --- internal/services/dns/dns_aaaa_record_resource_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/services/dns/dns_aaaa_record_resource_test.go b/internal/services/dns/dns_aaaa_record_resource_test.go index 5185450d72fa..15b45914480d 100644 --- a/internal/services/dns/dns_aaaa_record_resource_test.go +++ b/internal/services/dns/dns_aaaa_record_resource_test.go @@ -136,8 +136,10 @@ func TestAccAzureRMDnsAAAARecord_RecordsToAlias(t *testing.T) { Config: r.AliasToRecords(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - acceptance.TestCheckResourceAttrPair(data.ResourceName, "target_resource_id", targetResourceName, "id"), - acceptance.TestCheckNoResourceAttr(data.ResourceName, "records"), + check.That(data.ResourceName).Key("target_resource_id").MatchesOtherKey( + check.That(targetResourceName).Key("id"), + ), + check.That(data.ResourceName).Key("records.#").HasValue("0"), ), }, data.ImportStep(),