From 60103c083a0b607d1782162f60855da0ba440901 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 20 Apr 2016 12:10:26 -0700 Subject: [PATCH] providers/aws: working on id-only tests, no bugs found in these resources --- builtin/providers/aws/resource_aws_subnet_test.go | 7 ++++--- ...source_aws_vpc_dhcp_options_association_test.go | 6 +++++- .../aws/resource_aws_vpc_endpoint_test.go | 14 ++++++++------ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/builtin/providers/aws/resource_aws_subnet_test.go b/builtin/providers/aws/resource_aws_subnet_test.go index 5b80b84890..2a4e3259dc 100644 --- a/builtin/providers/aws/resource_aws_subnet_test.go +++ b/builtin/providers/aws/resource_aws_subnet_test.go @@ -27,9 +27,10 @@ func TestAccAWSSubnet_basic(t *testing.T) { } resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckSubnetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_subnet.foo", + Providers: testAccProviders, + CheckDestroy: testAccCheckSubnetDestroy, Steps: []resource.TestStep{ resource.TestStep{ Config: testAccSubnetConfig, diff --git a/builtin/providers/aws/resource_aws_vpc_dhcp_options_association_test.go b/builtin/providers/aws/resource_aws_vpc_dhcp_options_association_test.go index 84b58029af..9cdd46766d 100644 --- a/builtin/providers/aws/resource_aws_vpc_dhcp_options_association_test.go +++ b/builtin/providers/aws/resource_aws_vpc_dhcp_options_association_test.go @@ -14,7 +14,11 @@ func TestAccAWSDHCPOptionsAssociation_basic(t *testing.T) { var d ec2.DhcpOptions resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t) }, + + DisableIDRefresh: true, + IDRefreshName: "aws_vpc_dhcp_options_association.foo", + Providers: testAccProviders, CheckDestroy: testAccCheckDHCPOptionsAssociationDestroy, Steps: []resource.TestStep{ diff --git a/builtin/providers/aws/resource_aws_vpc_endpoint_test.go b/builtin/providers/aws/resource_aws_vpc_endpoint_test.go index 4a081b69c0..c39162588f 100644 --- a/builtin/providers/aws/resource_aws_vpc_endpoint_test.go +++ b/builtin/providers/aws/resource_aws_vpc_endpoint_test.go @@ -16,9 +16,10 @@ func TestAccAWSVpcEndpoint_basic(t *testing.T) { var endpoint ec2.VpcEndpoint resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckVpcEndpointDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_vpc_endpoint.second-private-s3", + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcEndpointDestroy, Steps: []resource.TestStep{ resource.TestStep{ Config: testAccVpcEndpointWithRouteTableAndPolicyConfig, @@ -35,9 +36,10 @@ func TestAccAWSVpcEndpoint_withRouteTableAndPolicy(t *testing.T) { var routeTable ec2.RouteTable resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckVpcEndpointDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_vpc_endpoint.second-private-s3", + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcEndpointDestroy, Steps: []resource.TestStep{ resource.TestStep{ Config: testAccVpcEndpointWithRouteTableAndPolicyConfig,