Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilson Lin committed Sep 19, 2023
1 parent f3c4039 commit 3f37175
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/framework/resources/zone_record_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package resources_test

import (
"context"
"encoding/json"
"errors"
"fmt"
"os"
Expand Down Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit 3f37175

Please sign in to comment.