Merge pull request #7110 from hashicorp/b-tags-match-update

Update tests for new map count indicator
This commit is contained in:
Paul Hinze 2016-06-10 10:28:52 -05:00 committed by GitHub
commit d175b04182
30 changed files with 61 additions and 61 deletions

View File

@ -45,7 +45,7 @@ func TestAccAWSAmiDataSource_natInstance(t *testing.T) {
resource.TestCheckResourceAttr("data.aws_ami.nat_ami", "state", "available"),
resource.TestCheckResourceAttr("data.aws_ami.nat_ami", "state_reason.code", "UNSET"),
resource.TestCheckResourceAttr("data.aws_ami.nat_ami", "state_reason.message", "UNSET"),
resource.TestCheckResourceAttr("data.aws_ami.nat_ami", "tags.#", "0"),
resource.TestCheckResourceAttr("data.aws_ami.nat_ami", "tags.%", "0"),
resource.TestCheckResourceAttr("data.aws_ami.nat_ami", "virtualization_type", "hvm"),
),
},
@ -82,7 +82,7 @@ func TestAccAWSAmiDataSource_windowsInstance(t *testing.T) {
resource.TestCheckResourceAttr("data.aws_ami.windows_ami", "state", "available"),
resource.TestCheckResourceAttr("data.aws_ami.windows_ami", "state_reason.code", "UNSET"),
resource.TestCheckResourceAttr("data.aws_ami.windows_ami", "state_reason.message", "UNSET"),
resource.TestCheckResourceAttr("data.aws_ami.windows_ami", "tags.#", "0"),
resource.TestCheckResourceAttr("data.aws_ami.windows_ami", "tags.%", "0"),
resource.TestCheckResourceAttr("data.aws_ami.windows_ami", "virtualization_type", "hvm"),
),
},
@ -116,7 +116,7 @@ func TestAccAWSAmiDataSource_instanceStore(t *testing.T) {
resource.TestCheckResourceAttr("data.aws_ami.instance_store_ami", "state", "available"),
resource.TestCheckResourceAttr("data.aws_ami.instance_store_ami", "state_reason.code", "UNSET"),
resource.TestCheckResourceAttr("data.aws_ami.instance_store_ami", "state_reason.message", "UNSET"),
resource.TestCheckResourceAttr("data.aws_ami.instance_store_ami", "tags.#", "0"),
resource.TestCheckResourceAttr("data.aws_ami.instance_store_ami", "tags.%", "0"),
resource.TestCheckResourceAttr("data.aws_ami.instance_store_ami", "virtualization_type", "hvm"),
),
},

View File

@ -69,7 +69,7 @@ func TestAccAWSCloudFormation_allAttributes(t *testing.T) {
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "parameters.#", "1"),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "parameters.VpcCIDR", "10.0.0.0/16"),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "policy_body", expectedPolicyBody),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.#", "2"),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.%", "2"),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.First", "Mickey"),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.Second", "Mouse"),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "timeout_in_minutes", "10"),
@ -87,7 +87,7 @@ func TestAccAWSCloudFormation_allAttributes(t *testing.T) {
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "parameters.#", "1"),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "parameters.VpcCIDR", "10.0.0.0/16"),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "policy_body", expectedPolicyBody),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.#", "2"),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.%", "2"),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.First", "Mickey"),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.Second", "Mouse"),
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "timeout_in_minutes", "10"),

View File

@ -176,7 +176,7 @@ func TestAccAWSCloudTrail_tags(t *testing.T) {
Config: testAccAWSCloudTrailConfig_tags(cloudTrailRandInt),
Check: resource.ComposeTestCheckFunc(
testAccCheckCloudTrailExists("aws_cloudtrail.foobar", &trail),
resource.TestCheckResourceAttr("aws_cloudtrail.foobar", "tags.#", "2"),
resource.TestCheckResourceAttr("aws_cloudtrail.foobar", "tags.%", "2"),
testAccCheckCloudTrailLoadTags(&trail, &trailTags),
testAccCheckCloudTrailCheckTags(&trailTags, map[string]string{"Foo": "moo", "Pooh": "hi"}),
testAccCheckCloudTrailLogValidationEnabled("aws_cloudtrail.foobar", false, &trail),
@ -187,7 +187,7 @@ func TestAccAWSCloudTrail_tags(t *testing.T) {
Config: testAccAWSCloudTrailConfig_tagsModified(cloudTrailRandInt),
Check: resource.ComposeTestCheckFunc(
testAccCheckCloudTrailExists("aws_cloudtrail.foobar", &trail),
resource.TestCheckResourceAttr("aws_cloudtrail.foobar", "tags.#", "3"),
resource.TestCheckResourceAttr("aws_cloudtrail.foobar", "tags.%", "3"),
testAccCheckCloudTrailLoadTags(&trail, &trailTagsModified),
testAccCheckCloudTrailCheckTags(&trailTagsModified, map[string]string{"Foo": "moo", "Moo": "boom", "Pooh": "hi"}),
testAccCheckCloudTrailLogValidationEnabled("aws_cloudtrail.foobar", false, &trail),
@ -198,7 +198,7 @@ func TestAccAWSCloudTrail_tags(t *testing.T) {
Config: testAccAWSCloudTrailConfig_tagsModifiedAgain(cloudTrailRandInt),
Check: resource.ComposeTestCheckFunc(
testAccCheckCloudTrailExists("aws_cloudtrail.foobar", &trail),
resource.TestCheckResourceAttr("aws_cloudtrail.foobar", "tags.#", "0"),
resource.TestCheckResourceAttr("aws_cloudtrail.foobar", "tags.%", "0"),
testAccCheckCloudTrailLoadTags(&trail, &trailTagsModified),
testAccCheckCloudTrailCheckTags(&trailTagsModified, map[string]string{}),
testAccCheckCloudTrailLogValidationEnabled("aws_cloudtrail.foobar", false, &trail),

View File

@ -48,7 +48,7 @@ func TestAccAWSDBParameterGroup_basic(t *testing.T) {
resource.TestCheckResourceAttr(
"aws_db_parameter_group.bar", "parameter.2478663599.value", "utf8"),
resource.TestCheckResourceAttr(
"aws_db_parameter_group.bar", "tags.#", "1"),
"aws_db_parameter_group.bar", "tags.%", "1"),
),
},
resource.TestStep{
@ -83,7 +83,7 @@ func TestAccAWSDBParameterGroup_basic(t *testing.T) {
resource.TestCheckResourceAttr(
"aws_db_parameter_group.bar", "parameter.2478663599.value", "utf8"),
resource.TestCheckResourceAttr(
"aws_db_parameter_group.bar", "tags.#", "2"),
"aws_db_parameter_group.bar", "tags.%", "2"),
),
},
},

View File

@ -33,7 +33,7 @@ func TestAccAWSDBSecurityGroup_basic(t *testing.T) {
resource.TestCheckResourceAttr(
"aws_db_security_group.bar", "ingress.#", "1"),
resource.TestCheckResourceAttr(
"aws_db_security_group.bar", "tags.#", "1"),
"aws_db_security_group.bar", "tags.%", "1"),
),
},
},

View File

@ -44,7 +44,7 @@ func TestAccAWSDBClusterParameterGroup_basic(t *testing.T) {
resource.TestCheckResourceAttr(
"aws_rds_cluster_parameter_group.bar", "parameter.2478663599.value", "utf8"),
resource.TestCheckResourceAttr(
"aws_rds_cluster_parameter_group.bar", "tags.#", "1"),
"aws_rds_cluster_parameter_group.bar", "tags.%", "1"),
),
},
resource.TestStep{
@ -79,7 +79,7 @@ func TestAccAWSDBClusterParameterGroup_basic(t *testing.T) {
resource.TestCheckResourceAttr(
"aws_rds_cluster_parameter_group.bar", "parameter.2478663599.value", "utf8"),
resource.TestCheckResourceAttr(
"aws_rds_cluster_parameter_group.bar", "tags.#", "2"),
"aws_rds_cluster_parameter_group.bar", "tags.%", "2"),
),
},
},

View File

@ -154,7 +154,7 @@ func TestAccAWSRedshiftCluster_tags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckAWSRedshiftClusterExists("aws_redshift_cluster.default", &v),
resource.TestCheckResourceAttr(
"aws_redshift_cluster.default", "tags.#", "3"),
"aws_redshift_cluster.default", "tags.%", "3"),
resource.TestCheckResourceAttr("aws_redshift_cluster.default", "tags.environment", "Production"),
),
},
@ -164,7 +164,7 @@ func TestAccAWSRedshiftCluster_tags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckAWSRedshiftClusterExists("aws_redshift_cluster.default", &v),
resource.TestCheckResourceAttr(
"aws_redshift_cluster.default", "tags.#", "1"),
"aws_redshift_cluster.default", "tags.%", "1"),
resource.TestCheckResourceAttr("aws_redshift_cluster.default", "tags.environment", "Production"),
),
},

View File

@ -50,7 +50,7 @@ func TestAccAzureRMAvailabilitySet_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMAvailabilitySetExists("azurerm_availability_set.test"),
resource.TestCheckResourceAttr(
"azurerm_availability_set.test", "tags.#", "2"),
"azurerm_availability_set.test", "tags.%", "2"),
resource.TestCheckResourceAttr(
"azurerm_availability_set.test", "tags.environment", "Production"),
resource.TestCheckResourceAttr(
@ -63,7 +63,7 @@ func TestAccAzureRMAvailabilitySet_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMAvailabilitySetExists("azurerm_availability_set.test"),
resource.TestCheckResourceAttr(
"azurerm_availability_set.test", "tags.#", "1"),
"azurerm_availability_set.test", "tags.%", "1"),
resource.TestCheckResourceAttr(
"azurerm_availability_set.test", "tags.environment", "staging"),
),

View File

@ -44,7 +44,7 @@ func TestAccAzureRMCdnEndpoint_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMCdnEndpointExists("azurerm_cdn_endpoint.test"),
resource.TestCheckResourceAttr(
"azurerm_cdn_endpoint.test", "tags.#", "2"),
"azurerm_cdn_endpoint.test", "tags.%", "2"),
resource.TestCheckResourceAttr(
"azurerm_cdn_endpoint.test", "tags.environment", "Production"),
resource.TestCheckResourceAttr(
@ -57,7 +57,7 @@ func TestAccAzureRMCdnEndpoint_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMCdnEndpointExists("azurerm_cdn_endpoint.test"),
resource.TestCheckResourceAttr(
"azurerm_cdn_endpoint.test", "tags.#", "1"),
"azurerm_cdn_endpoint.test", "tags.%", "1"),
resource.TestCheckResourceAttr(
"azurerm_cdn_endpoint.test", "tags.environment", "staging"),
),

View File

@ -82,7 +82,7 @@ func TestAccAzureRMCdnProfile_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMCdnProfileExists("azurerm_cdn_profile.test"),
resource.TestCheckResourceAttr(
"azurerm_cdn_profile.test", "tags.#", "2"),
"azurerm_cdn_profile.test", "tags.%", "2"),
resource.TestCheckResourceAttr(
"azurerm_cdn_profile.test", "tags.environment", "Production"),
resource.TestCheckResourceAttr(
@ -95,7 +95,7 @@ func TestAccAzureRMCdnProfile_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMCdnProfileExists("azurerm_cdn_profile.test"),
resource.TestCheckResourceAttr(
"azurerm_cdn_profile.test", "tags.#", "1"),
"azurerm_cdn_profile.test", "tags.%", "1"),
resource.TestCheckResourceAttr(
"azurerm_cdn_profile.test", "tags.environment", "staging"),
),

View File

@ -75,7 +75,7 @@ func TestAccAzureRMDnsARecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsARecordExists("azurerm_dns_a_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_a_record.test", "tags.#", "2"),
"azurerm_dns_a_record.test", "tags.%", "2"),
),
},
@ -84,7 +84,7 @@ func TestAccAzureRMDnsARecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsARecordExists("azurerm_dns_a_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_a_record.test", "tags.#", "1"),
"azurerm_dns_a_record.test", "tags.%", "1"),
),
},
},

View File

@ -75,7 +75,7 @@ func TestAccAzureRMDnsAAAARecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsAAAARecordExists("azurerm_dns_aaaa_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_aaaa_record.test", "tags.#", "2"),
"azurerm_dns_aaaa_record.test", "tags.%", "2"),
),
},
@ -84,7 +84,7 @@ func TestAccAzureRMDnsAAAARecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsAAAARecordExists("azurerm_dns_aaaa_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_aaaa_record.test", "tags.#", "1"),
"azurerm_dns_aaaa_record.test", "tags.%", "1"),
),
},
},

View File

@ -71,7 +71,7 @@ func TestAccAzureRMDnsCNameRecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsCNameRecordExists("azurerm_dns_cname_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_cname_record.test", "tags.#", "2"),
"azurerm_dns_cname_record.test", "tags.%", "2"),
),
},
@ -80,7 +80,7 @@ func TestAccAzureRMDnsCNameRecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsCNameRecordExists("azurerm_dns_cname_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_cname_record.test", "tags.#", "1"),
"azurerm_dns_cname_record.test", "tags.%", "1"),
),
},
},

View File

@ -75,7 +75,7 @@ func TestAccAzureRMDnsMxRecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsMxRecordExists("azurerm_dns_mx_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_mx_record.test", "tags.#", "2"),
"azurerm_dns_mx_record.test", "tags.%", "2"),
),
},
@ -84,7 +84,7 @@ func TestAccAzureRMDnsMxRecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsMxRecordExists("azurerm_dns_mx_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_mx_record.test", "tags.#", "1"),
"azurerm_dns_mx_record.test", "tags.%", "1"),
),
},
},

View File

@ -75,7 +75,7 @@ func TestAccAzureRMDnsNsRecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsNsRecordExists("azurerm_dns_ns_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_ns_record.test", "tags.#", "2"),
"azurerm_dns_ns_record.test", "tags.%", "2"),
),
},
@ -84,7 +84,7 @@ func TestAccAzureRMDnsNsRecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsNsRecordExists("azurerm_dns_ns_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_ns_record.test", "tags.#", "1"),
"azurerm_dns_ns_record.test", "tags.%", "1"),
),
},
},

View File

@ -75,7 +75,7 @@ func TestAccAzureRMDnsSrvRecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsSrvRecordExists("azurerm_dns_srv_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_srv_record.test", "tags.#", "2"),
"azurerm_dns_srv_record.test", "tags.%", "2"),
),
},
@ -84,7 +84,7 @@ func TestAccAzureRMDnsSrvRecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsSrvRecordExists("azurerm_dns_srv_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_srv_record.test", "tags.#", "1"),
"azurerm_dns_srv_record.test", "tags.%", "1"),
),
},
},

View File

@ -75,7 +75,7 @@ func TestAccAzureRMDnsTxtRecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsTxtRecordExists("azurerm_dns_txt_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_txt_record.test", "tags.#", "2"),
"azurerm_dns_txt_record.test", "tags.%", "2"),
),
},
@ -84,7 +84,7 @@ func TestAccAzureRMDnsTxtRecord_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDnsTxtRecordExists("azurerm_dns_txt_record.test"),
resource.TestCheckResourceAttr(
"azurerm_dns_txt_record.test", "tags.#", "1"),
"azurerm_dns_txt_record.test", "tags.%", "1"),
),
},
},

View File

@ -54,7 +54,7 @@ func TestAccAzureRMNetworkInterface_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMNetworkInterfaceExists("azurerm_network_interface.test"),
resource.TestCheckResourceAttr(
"azurerm_network_interface.test", "tags.#", "2"),
"azurerm_network_interface.test", "tags.%", "2"),
resource.TestCheckResourceAttr(
"azurerm_network_interface.test", "tags.environment", "Production"),
resource.TestCheckResourceAttr(
@ -66,7 +66,7 @@ func TestAccAzureRMNetworkInterface_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMNetworkInterfaceExists("azurerm_network_interface.test"),
resource.TestCheckResourceAttr(
"azurerm_network_interface.test", "tags.#", "1"),
"azurerm_network_interface.test", "tags.%", "1"),
resource.TestCheckResourceAttr(
"azurerm_network_interface.test", "tags.environment", "staging"),
),

View File

@ -36,7 +36,7 @@ func TestAccAzureRMNetworkSecurityGroup_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMNetworkSecurityGroupExists("azurerm_network_security_group.test"),
resource.TestCheckResourceAttr(
"azurerm_network_security_group.test", "tags.#", "2"),
"azurerm_network_security_group.test", "tags.%", "2"),
resource.TestCheckResourceAttr(
"azurerm_network_security_group.test", "tags.environment", "Production"),
resource.TestCheckResourceAttr(
@ -49,7 +49,7 @@ func TestAccAzureRMNetworkSecurityGroup_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMNetworkSecurityGroupExists("azurerm_network_security_group.test"),
resource.TestCheckResourceAttr(
"azurerm_network_security_group.test", "tags.#", "1"),
"azurerm_network_security_group.test", "tags.%", "1"),
resource.TestCheckResourceAttr(
"azurerm_network_security_group.test", "tags.environment", "staging"),
),

View File

@ -114,7 +114,7 @@ func TestAccAzureRMPublicIpStatic_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMPublicIpExists("azurerm_public_ip.test"),
resource.TestCheckResourceAttr(
"azurerm_public_ip.test", "tags.#", "2"),
"azurerm_public_ip.test", "tags.%", "2"),
resource.TestCheckResourceAttr(
"azurerm_public_ip.test", "tags.environment", "Production"),
resource.TestCheckResourceAttr(
@ -127,7 +127,7 @@ func TestAccAzureRMPublicIpStatic_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMPublicIpExists("azurerm_public_ip.test"),
resource.TestCheckResourceAttr(
"azurerm_public_ip.test", "tags.#", "1"),
"azurerm_public_ip.test", "tags.%", "1"),
resource.TestCheckResourceAttr(
"azurerm_public_ip.test", "tags.environment", "staging"),
),

View File

@ -44,7 +44,7 @@ func TestAccAzureRMResourceGroup_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMResourceGroupExists("azurerm_resource_group.test"),
resource.TestCheckResourceAttr(
"azurerm_resource_group.test", "tags.#", "2"),
"azurerm_resource_group.test", "tags.%", "2"),
resource.TestCheckResourceAttr(
"azurerm_resource_group.test", "tags.environment", "Production"),
resource.TestCheckResourceAttr(
@ -57,7 +57,7 @@ func TestAccAzureRMResourceGroup_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMResourceGroupExists("azurerm_resource_group.test"),
resource.TestCheckResourceAttr(
"azurerm_resource_group.test", "tags.#", "1"),
"azurerm_resource_group.test", "tags.%", "1"),
resource.TestCheckResourceAttr(
"azurerm_resource_group.test", "tags.environment", "staging"),
),

View File

@ -94,7 +94,7 @@ func TestAccAzureRMRouteTable_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMRouteTableExists("azurerm_route_table.test"),
resource.TestCheckResourceAttr(
"azurerm_route_table.test", "tags.#", "2"),
"azurerm_route_table.test", "tags.%", "2"),
resource.TestCheckResourceAttr(
"azurerm_route_table.test", "tags.environment", "Production"),
resource.TestCheckResourceAttr(
@ -107,7 +107,7 @@ func TestAccAzureRMRouteTable_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMRouteTableExists("azurerm_route_table.test"),
resource.TestCheckResourceAttr(
"azurerm_route_table.test", "tags.#", "1"),
"azurerm_route_table.test", "tags.%", "1"),
resource.TestCheckResourceAttr(
"azurerm_route_table.test", "tags.environment", "staging"),
),

View File

@ -24,7 +24,7 @@ func TestAccAzureRMSearchService_basic(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMSearchServiceExists("azurerm_search_service.test"),
resource.TestCheckResourceAttr(
"azurerm_search_service.test", "tags.#", "2"),
"azurerm_search_service.test", "tags.%", "2"),
),
},
},
@ -46,7 +46,7 @@ func TestAccAzureRMSearchService_updateReplicaCountAndTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMSearchServiceExists("azurerm_search_service.test"),
resource.TestCheckResourceAttr(
"azurerm_search_service.test", "tags.#", "2"),
"azurerm_search_service.test", "tags.%", "2"),
resource.TestCheckResourceAttr(
"azurerm_search_service.test", "replica_count", "1"),
),
@ -57,7 +57,7 @@ func TestAccAzureRMSearchService_updateReplicaCountAndTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMSearchServiceExists("azurerm_search_service.test"),
resource.TestCheckResourceAttr(
"azurerm_search_service.test", "tags.#", "1"),
"azurerm_search_service.test", "tags.%", "1"),
resource.TestCheckResourceAttr(
"azurerm_search_service.test", "replica_count", "2"),
),

View File

@ -76,7 +76,7 @@ func TestAccAzureRMSqlDatabase_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMSqlDatabaseExists("azurerm_sql_database.test"),
resource.TestCheckResourceAttr(
"azurerm_sql_database.test", "tags.#", "2"),
"azurerm_sql_database.test", "tags.%", "2"),
),
},
@ -85,7 +85,7 @@ func TestAccAzureRMSqlDatabase_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMSqlDatabaseExists("azurerm_sql_database.test"),
resource.TestCheckResourceAttr(
"azurerm_sql_database.test", "tags.#", "1"),
"azurerm_sql_database.test", "tags.%", "1"),
),
},
},

View File

@ -44,7 +44,7 @@ func TestAccAzureRMSqlServer_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMSqlServerExists("azurerm_sql_server.test"),
resource.TestCheckResourceAttr(
"azurerm_sql_server.test", "tags.#", "2"),
"azurerm_sql_server.test", "tags.%", "2"),
),
},
@ -53,7 +53,7 @@ func TestAccAzureRMSqlServer_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMSqlServerExists("azurerm_sql_server.test"),
resource.TestCheckResourceAttr(
"azurerm_sql_server.test", "tags.#", "1"),
"azurerm_sql_server.test", "tags.%", "1"),
),
},
},

View File

@ -60,7 +60,7 @@ func TestAccAzureRMStorageAccount_basic(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMStorageAccountExists("azurerm_storage_account.testsa"),
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "account_type", "Standard_LRS"),
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "tags.#", "1"),
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "tags.%", "1"),
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "tags.environment", "production"),
),
},
@ -70,7 +70,7 @@ func TestAccAzureRMStorageAccount_basic(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMStorageAccountExists("azurerm_storage_account.testsa"),
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "account_type", "Standard_GRS"),
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "tags.#", "1"),
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "tags.%", "1"),
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "tags.environment", "staging"),
),
},

View File

@ -42,7 +42,7 @@ func TestAccAzureRMVirtualMachine_tags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMVirtualMachineExists("azurerm_virtual_machine.test"),
resource.TestCheckResourceAttr(
"azurerm_virtual_machine.test", "tags.#", "2"),
"azurerm_virtual_machine.test", "tags.%", "2"),
resource.TestCheckResourceAttr(
"azurerm_virtual_machine.test", "tags.environment", "Production"),
resource.TestCheckResourceAttr(
@ -55,7 +55,7 @@ func TestAccAzureRMVirtualMachine_tags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMVirtualMachineExists("azurerm_virtual_machine.test"),
resource.TestCheckResourceAttr(
"azurerm_virtual_machine.test", "tags.#", "1"),
"azurerm_virtual_machine.test", "tags.%", "1"),
resource.TestCheckResourceAttr(
"azurerm_virtual_machine.test", "tags.environment", "Production"),
),

View File

@ -46,7 +46,7 @@ func TestAccAzureRMVirtualNetwork_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMVirtualNetworkExists("azurerm_virtual_network.test"),
resource.TestCheckResourceAttr(
"azurerm_virtual_network.test", "tags.#", "2"),
"azurerm_virtual_network.test", "tags.%", "2"),
resource.TestCheckResourceAttr(
"azurerm_virtual_network.test", "tags.environment", "Production"),
resource.TestCheckResourceAttr(
@ -59,7 +59,7 @@ func TestAccAzureRMVirtualNetwork_withTags(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMVirtualNetworkExists("azurerm_virtual_network.test"),
resource.TestCheckResourceAttr(
"azurerm_virtual_network.test", "tags.#", "1"),
"azurerm_virtual_network.test", "tags.%", "1"),
resource.TestCheckResourceAttr(
"azurerm_virtual_network.test", "tags.environment", "staging"),
),

View File

@ -2169,7 +2169,7 @@ func TestSchemaMap_Diff(t *testing.T) {
State: &terraform.InstanceState{
Attributes: map[string]string{
"tags.#": "0",
"tags.%": "0",
},
},

View File

@ -469,7 +469,7 @@ func getInterpolaterFixture(t *testing.T) *Interpolater {
"name_servers.3": "ns-601.awsdns-11.net",
"listeners.#": "1",
"listeners.0": "red",
"tags.#": "1",
"tags.%": "1",
"tags.Name": "reindeer",
"nothing.#": "0",
},
@ -490,7 +490,7 @@ func getInterpolaterFixture(t *testing.T) *Interpolater {
"listeners.0": "blue",
"special.#": "1",
"special.0": "extra",
"tags.#": "1",
"tags.%": "1",
"tags.Name": "white-hart",
"nothing.#": "0",
},