Merge pull request #3987 from hashicorp/b-aws-test-fixes

AWS Test fixtures updates
This commit is contained in:
Paul Hinze 2015-11-20 10:36:38 -06:00
commit c637ca039c
2 changed files with 6 additions and 3 deletions

View File

@ -141,6 +141,7 @@ func resourceAwsElasticacheCluster() *schema.Resource {
"snapshot_window": &schema.Schema{ "snapshot_window": &schema.Schema{
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Computed: true,
}, },
"snapshot_retention_limit": &schema.Schema{ "snapshot_retention_limit": &schema.Schema{

View File

@ -33,7 +33,6 @@ func TestAccAWSFlowLog_basic(t *testing.T) {
func TestAccAWSFlowLog_subnet(t *testing.T) { func TestAccAWSFlowLog_subnet(t *testing.T) {
var flowLog ec2.FlowLog var flowLog ec2.FlowLog
lgn := os.Getenv("LOG_GROUP_NAME")
resource.Test(t, resource.TestCase{ resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) }, PreCheck: func() { testAccPreCheck(t) },
@ -41,7 +40,7 @@ func TestAccAWSFlowLog_subnet(t *testing.T) {
CheckDestroy: testAccCheckFlowLogDestroy, CheckDestroy: testAccCheckFlowLogDestroy,
Steps: []resource.TestStep{ Steps: []resource.TestStep{
resource.TestStep{ resource.TestStep{
Config: fmt.Sprintf(testAccFlowLogConfig_subnet, lgn), Config: testAccFlowLogConfig_subnet,
Check: resource.ComposeTestCheckFunc( Check: resource.ComposeTestCheckFunc(
testAccCheckFlowLogExists("aws_flow_log.test_flow_log_subnet", &flowLog), testAccCheckFlowLogExists("aws_flow_log.test_flow_log_subnet", &flowLog),
testAccCheckAWSFlowLogAttributes(&flowLog), testAccCheckAWSFlowLogAttributes(&flowLog),
@ -200,11 +199,14 @@ resource "aws_iam_role" "test_role" {
} }
EOF EOF
} }
resource "aws_cloudwatch_log_group" "foobar" {
name = "foo-bar"
}
resource "aws_flow_log" "test_flow_log_subnet" { resource "aws_flow_log" "test_flow_log_subnet" {
# log_group_name needs to exist before hand # log_group_name needs to exist before hand
# until we have a CloudWatch Log Group Resource # until we have a CloudWatch Log Group Resource
log_group_name = "%s" log_group_name = "${aws_cloudwatch_log_group.foobar.name}"
iam_role_arn = "${aws_iam_role.test_role.arn}" iam_role_arn = "${aws_iam_role.test_role.arn}"
subnet_id = "${aws_subnet.test_subnet.id}" subnet_id = "${aws_subnet.test_subnet.id}"
traffic_type = "ALL" traffic_type = "ALL"