Skip to content

Commit

Permalink
fix format, modify acctest
Browse files Browse the repository at this point in the history
  • Loading branch information
atsushi-ishibashi committed Mar 29, 2019
1 parent b756b54 commit d0bcda3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
5 changes: 4 additions & 1 deletion aws/resource_aws_codepipeline_custom_action_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,10 @@ func flattenAwsCodePipelineActionConfigurationProperty(acps []*codepipeline.Acti
m["queryable"] = aws.BoolValue(acp.Queryable)
m["required"] = aws.BoolValue(acp.Required)
m["secret"] = aws.BoolValue(acp.Secret)
m["type"] = aws.StringValue(acp.Type)
// Currently AWS doesn't return type
if acp.Type != nil {
m["type"] = aws.StringValue(acp.Type)
}
result = append(result, m)
}
return result
Expand Down
34 changes: 16 additions & 18 deletions aws/resource_aws_codepipeline_custom_action_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ func TestAccAwsCodePipelineCustomActionType_configurationProperties(t *testing.T
resource.TestCheckResourceAttr(resourceName, "configuration_properties.0.queryable", "true"),
resource.TestCheckResourceAttr(resourceName, "configuration_properties.0.required", "true"),
resource.TestCheckResourceAttr(resourceName, "configuration_properties.0.secret", "false"),
resource.TestCheckResourceAttr(resourceName, "configuration_properties.0.type", "String"),
),
},
{
Expand Down Expand Up @@ -160,7 +159,7 @@ resource "aws_codepipeline_custom_action_type" "test" {
maximum_count = 1
minimum_count = 0
}
provider_name = "tf-%s"
provider_name = "tf-%s"
version = "1"
}
`, rName)
Expand All @@ -178,13 +177,13 @@ resource "aws_codepipeline_custom_action_type" "test" {
maximum_count = 1
minimum_count = 0
}
provider_name = "tf-%s"
provider_name = "tf-%s"
version = "1"
settings {
entity_url_template = "http://example.com"
execution_url_template = "http://example.com"
revision_url_template = "http://example.com"
}
settings {
entity_url_template = "http://example.com"
execution_url_template = "http://example.com"
revision_url_template = "http://example.com"
}
}
`, rName)
}
Expand All @@ -201,17 +200,16 @@ resource "aws_codepipeline_custom_action_type" "test" {
maximum_count = 1
minimum_count = 0
}
provider_name = "tf-%s"
provider_name = "tf-%s"
version = "1"
configuration_properties {
description = "tf-test"
key = true
name = "tf-test-%s"
queryable = true
required = true
secret = false
type = "String"
}
configuration_properties {
description = "tf-test"
key = true
name = "tf-test-%s"
queryable = true
required = true
secret = false
}
}
`, rName, rName)
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resource "aws_codepipeline_custom_action_type" "example" {
maximum_count = 1
minimum_count = 0
}
provider_name = "example"
provider_name = "example"
version = "1"
}
```
Expand Down

0 comments on commit d0bcda3

Please sign in to comment.