From 3f37175c827afc7f592a16dc63051e55300eaab5 Mon Sep 17 00:00:00 2001 From: Wilson Lin Date: Tue, 19 Sep 2023 15:27:27 +1000 Subject: [PATCH] Fix tests --- .../framework/resources/zone_record_resource_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/framework/resources/zone_record_resource_test.go b/internal/framework/resources/zone_record_resource_test.go index 8623765e..9d7cb0ee 100644 --- a/internal/framework/resources/zone_record_resource_test.go +++ b/internal/framework/resources/zone_record_resource_test.go @@ -2,6 +2,7 @@ package resources_test import ( "context" + "encoding/json" "errors" "fmt" "os" @@ -263,6 +264,10 @@ resource "dnsimple_zone_record" "test" { } func testAccZoneRecordResourceStandardWithRegionsConfig(domainName string, regions []string) string { + regionsRaw, err := json.Marshal(regions) + if err != nil { + panic(err) + } return fmt.Sprintf(` resource "dnsimple_zone_record" "test" { zone_name = %[1]q @@ -271,8 +276,8 @@ resource "dnsimple_zone_record" "test" { value = "192.168.0.10" type = "A" ttl = 2800 - regions = %[2]q -}`, domainName, regions) + regions = %[2]s +}`, domainName, regionsRaw) } func testAccZoneRecordResourceStandardWithDefaultsConfig(domainName string) string {