Skip to content

Commit

Permalink
Update dns managed zone test
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
slevenick authored and modular-magician committed Dec 3, 2019
1 parent d0d6a89 commit c585846
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions google/data_source_dns_managed_zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,19 @@ func dataSourceDnsManagedZone() *schema.Resource {
},

"name_servers": {
Type: schema.TypeSet,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},

// Google Cloud DNS ManagedZone resources do not have a SelfLink attribute.
"visibility": {
Type: schema.TypeString,
Computed: true,
},

// Google Cloud DNS ManagedZone resources do not have a SelfLink attribute.
"project": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -65,6 +69,8 @@ func dataSourceDnsManagedZoneRead(d *schema.ResourceData, meta interface{}) erro
d.Set("name", zone.Name)
d.Set("dns_name", zone.DnsName)
d.Set("description", zone.Description)
d.Set("visibility", zone.Visibility)
d.Set("project", project)

return nil
}
9 changes: 8 additions & 1 deletion google/data_source_dns_managed_zone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ func TestAccDataSourceDnsManagedZone_basic(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testAccDataSourceDnsManagedZone_basic(),
Check: checkDataSourceStateMatchesResourceState("data.google_dns_managed_zone.qa", "google_dns_managed_zone.foo"),
Check: checkDataSourceStateMatchesResourceStateWithIgnores(
"data.google_dns_managed_zone.qa",
"google_dns_managed_zone.foo",
map[string]struct{}{
"dnssec_config.#": {},
"private_visibility_config.#": {},
},
),
},
},
})
Expand Down
1 change: 0 additions & 1 deletion google/resource_sql_database_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/acctest"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/terraform"

sqladmin "google.golang.org/api/sqladmin/v1beta4"
)

Expand Down

0 comments on commit c585846

Please sign in to comment.