From 0530cf963dc7eba34c6c43e67e1c51028a7b49c9 Mon Sep 17 00:00:00 2001 From: clint shryock Date: Fri, 10 Jun 2016 12:45:24 -0500 Subject: [PATCH 1/2] provider/aws: revert # -> % for tests --- builtin/providers/aws/data_source_aws_ami_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/providers/aws/data_source_aws_ami_test.go b/builtin/providers/aws/data_source_aws_ami_test.go index d1a2657aa..2f8eba3eb 100644 --- a/builtin/providers/aws/data_source_aws_ami_test.go +++ b/builtin/providers/aws/data_source_aws_ami_test.go @@ -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"), ), }, From 88ed387bd6a8c37c40cd06c0defaec9227667b0d Mon Sep 17 00:00:00 2001 From: clint shryock Date: Fri, 10 Jun 2016 12:52:10 -0500 Subject: [PATCH 2/2] fix up cloudformation test checks --- .../providers/aws/resource_aws_cloudformation_stack_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/resource_aws_cloudformation_stack_test.go b/builtin/providers/aws/resource_aws_cloudformation_stack_test.go index 0b26b6682..d4c5d44c2 100644 --- a/builtin/providers/aws/resource_aws_cloudformation_stack_test.go +++ b/builtin/providers/aws/resource_aws_cloudformation_stack_test.go @@ -66,7 +66,7 @@ func TestAccAWSCloudFormation_allAttributes(t *testing.T) { resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "capabilities.1328347040", "CAPABILITY_IAM"), resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "disable_rollback", "false"), resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "notification_arns.#", "1"), - resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "parameters.#", "1"), + 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"), @@ -84,7 +84,7 @@ func TestAccAWSCloudFormation_allAttributes(t *testing.T) { resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "capabilities.1328347040", "CAPABILITY_IAM"), resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "disable_rollback", "false"), resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "notification_arns.#", "1"), - resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "parameters.#", "1"), + 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"),