From e2a1f5e25e710f3cd083ecfd0ed2c79cfebf2d02 Mon Sep 17 00:00:00 2001 From: = Date: Wed, 5 Apr 2017 09:07:49 -0600 Subject: [PATCH 1/2] Fixed TestAccAWSEcsDataSource_ecsTaskDefinition --- .../providers/aws/data_source_aws_ecs_task_definition_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/data_source_aws_ecs_task_definition_test.go b/builtin/providers/aws/data_source_aws_ecs_task_definition_test.go index 545da0714..6d6ffa35a 100644 --- a/builtin/providers/aws/data_source_aws_ecs_task_definition_test.go +++ b/builtin/providers/aws/data_source_aws_ecs_task_definition_test.go @@ -15,10 +15,10 @@ func TestAccAWSEcsDataSource_ecsTaskDefinition(t *testing.T) { resource.TestStep{ Config: testAccCheckAwsEcsTaskDefinitionDataSourceConfig, Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr("data.aws_ecs_task_definition.mongo", "id", regexp.MustCompile("^arn:aws:ecs:us-west-2:[0-9]{12}:task-definition/mongodb:[1-9]*[0-9]$")), + resource.TestMatchResourceAttr("data.aws_ecs_task_definition.mongo", "id", regexp.MustCompile("^arn:aws:ecs:us-west-2:[0-9]{12}:task-definition/mongodb:[1-9][0-9]*$")), resource.TestCheckResourceAttr("data.aws_ecs_task_definition.mongo", "family", "mongodb"), resource.TestCheckResourceAttr("data.aws_ecs_task_definition.mongo", "network_mode", "bridge"), - resource.TestMatchResourceAttr("data.aws_ecs_task_definition.mongo", "revision", regexp.MustCompile("^[1-9]*[0-9]$")), + resource.TestMatchResourceAttr("data.aws_ecs_task_definition.mongo", "revision", regexp.MustCompile("^[1-9][0-9]*$")), resource.TestCheckResourceAttr("data.aws_ecs_task_definition.mongo", "status", "ACTIVE"), resource.TestMatchResourceAttr("data.aws_ecs_task_definition.mongo", "task_role_arn", regexp.MustCompile("^arn:aws:iam::[0-9]{12}:role/mongo_role$")), ), From 1f13ff22a3f4961782e3c4793510a4d966169e9a Mon Sep 17 00:00:00 2001 From: = Date: Wed, 5 Apr 2017 16:07:14 -0600 Subject: [PATCH 2/2] TestAccAWSAutoScalingGroup_ALB_TargetGroups passes --- builtin/providers/aws/resource_aws_autoscaling_group.go | 1 - .../providers/aws/resource_aws_autoscaling_group_test.go | 9 --------- 2 files changed, 10 deletions(-) diff --git a/builtin/providers/aws/resource_aws_autoscaling_group.go b/builtin/providers/aws/resource_aws_autoscaling_group.go index a5e10e034..ef21f2492 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group.go @@ -446,7 +446,6 @@ func resourceAwsAutoscalingGroupRead(d *schema.ResourceData, meta interface{}) e d.Set("health_check_type", g.HealthCheckType) d.Set("launch_configuration", g.LaunchConfigurationName) d.Set("load_balancers", flattenStringList(g.LoadBalancerNames)) - d.Set("target_group_arns", flattenStringList(g.TargetGroupARNs)) if err := d.Set("suspended_processes", flattenAsgSuspendedProcesses(g.SuspendedProcesses)); err != nil { log.Printf("[WARN] Error setting suspended_processes for %q: %s", d.Id(), err) diff --git a/builtin/providers/aws/resource_aws_autoscaling_group_test.go b/builtin/providers/aws/resource_aws_autoscaling_group_test.go index 1c310433f..ee17f8844 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group_test.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group_test.go @@ -445,15 +445,6 @@ func TestAccAWSAutoScalingGroup_ALB_TargetGroups(t *testing.T) { "aws_autoscaling_group.bar", "target_group_arns.#", "1"), ), }, - - resource.TestStep{ - Config: testAccAWSAutoScalingGroupConfig_ALB_TargetGroup_pre, - Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSAutoScalingGroupExists("aws_autoscaling_group.bar", &group), - resource.TestCheckResourceAttr( - "aws_autoscaling_group.bar", "target_group_arns.#", "0"), - ), - }, }, }) }