From 7292c9df2508d32ec03d04d6e2d727eb9aae6d7f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 21 Apr 2016 08:36:54 -0700 Subject: [PATCH] providers/aws: remove the opt-out stuff for id-only --- .../aws/resource_aws_s3_bucket_test.go | 7 +++--- .../aws/resource_aws_security_group_test.go | 16 +++++-------- .../aws/resource_aws_sqs_queue_test.go | 24 +++++++------------ ...e_aws_vpc_dhcp_options_association_test.go | 6 +---- ...esource_aws_vpc_peering_connection_test.go | 3 --- 5 files changed, 20 insertions(+), 36 deletions(-) diff --git a/builtin/providers/aws/resource_aws_s3_bucket_test.go b/builtin/providers/aws/resource_aws_s3_bucket_test.go index 9f825b4c7..a1cfd0315 100644 --- a/builtin/providers/aws/resource_aws_s3_bucket_test.go +++ b/builtin/providers/aws/resource_aws_s3_bucket_test.go @@ -23,9 +23,10 @@ func TestAccAWSS3Bucket_basic(t *testing.T) { "^arn:aws:s3:::") resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSS3BucketDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_s3_bucket.bucket", + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ resource.TestStep{ Config: testAccAWSS3BucketConfig(rInt), diff --git a/builtin/providers/aws/resource_aws_security_group_test.go b/builtin/providers/aws/resource_aws_security_group_test.go index e4b8c7ead..23bdb0622 100644 --- a/builtin/providers/aws/resource_aws_security_group_test.go +++ b/builtin/providers/aws/resource_aws_security_group_test.go @@ -544,11 +544,9 @@ func TestAccAWSSecurityGroup_DefaultEgress(t *testing.T) { func TestAccAWSSecurityGroup_drift(t *testing.T) { var group ec2.SecurityGroup resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - DisableIDRefresh: true, - IDRefreshName: "aws_security_group.web", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, Steps: []resource.TestStep{ resource.TestStep{ Config: testAccAWSSecurityGroupConfig_drift(), @@ -576,11 +574,9 @@ func TestAccAWSSecurityGroup_drift_complex(t *testing.T) { var group ec2.SecurityGroup resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - DisableIDRefresh: true, - IDRefreshName: "aws_security_group.web", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, Steps: []resource.TestStep{ resource.TestStep{ Config: testAccAWSSecurityGroupConfig_drift_complex(), diff --git a/builtin/providers/aws/resource_aws_sqs_queue_test.go b/builtin/providers/aws/resource_aws_sqs_queue_test.go index 0577dc134..a210fc5d2 100644 --- a/builtin/providers/aws/resource_aws_sqs_queue_test.go +++ b/builtin/providers/aws/resource_aws_sqs_queue_test.go @@ -14,11 +14,9 @@ import ( func TestAccAWSSQSQueue_basic(t *testing.T) { resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - DisableIDRefresh: true, - IDRefreshName: "aws_sqs_queue.queue-with-defaults", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSQSQueueDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSQSQueueDestroy, Steps: []resource.TestStep{ resource.TestStep{ Config: testAccAWSSQSConfigWithDefaults, @@ -38,11 +36,9 @@ func TestAccAWSSQSQueue_basic(t *testing.T) { func TestAccAWSSQSQueue_redrivePolicy(t *testing.T) { resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - DisableIDRefresh: true, - IDRefreshName: "aws_sqs_queue.my_dead_letter_queue", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSQSQueueDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSQSQueueDestroy, Steps: []resource.TestStep{ resource.TestStep{ Config: testAccAWSSQSConfigWithRedrive(acctest.RandStringFromCharSet(5, acctest.CharSetAlpha)), @@ -57,11 +53,9 @@ func TestAccAWSSQSQueue_redrivePolicy(t *testing.T) { // Tests formatting and compacting of Policy, Redrive json func TestAccAWSSQSQueue_Policybasic(t *testing.T) { resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - DisableIDRefresh: true, - IDRefreshName: "aws_sqs_queue.test-email-events", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSQSQueueDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSQSQueueDestroy, Steps: []resource.TestStep{ resource.TestStep{ Config: testAccAWSSQSConfig_PolicyFormat, 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 9cdd46766..84b58029a 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,11 +14,7 @@ func TestAccAWSDHCPOptionsAssociation_basic(t *testing.T) { var d ec2.DhcpOptions resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - - DisableIDRefresh: true, - IDRefreshName: "aws_vpc_dhcp_options_association.foo", - + PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDHCPOptionsAssociationDestroy, Steps: []resource.TestStep{ diff --git a/builtin/providers/aws/resource_aws_vpc_peering_connection_test.go b/builtin/providers/aws/resource_aws_vpc_peering_connection_test.go index 8d8916330..5aefdd6a9 100644 --- a/builtin/providers/aws/resource_aws_vpc_peering_connection_test.go +++ b/builtin/providers/aws/resource_aws_vpc_peering_connection_test.go @@ -63,9 +63,6 @@ func TestAccAWSVPCPeeringConnection_plan(t *testing.T) { t.Fatal("AWS_ACCOUNT_ID must be set") } }, - - DisableIDRefresh: true, - Providers: testAccProviders, CheckDestroy: testAccCheckAWSVpcPeeringConnectionDestroy, Steps: []resource.TestStep{