Skip to content

Commit

Permalink
Acceptance test import refactor for SQS queue policy
Browse files Browse the repository at this point in the history
  • Loading branch information
ryndaniels committed Sep 2, 2019
1 parent 960a406 commit 8bad05a
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions aws/resource_aws_sqs_queue_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import (

func TestAccAWSSQSQueuePolicy_basic(t *testing.T) {
var queueAttributes map[string]*string

resourceName := "aws_sqs_queue_policy.test"
queueName := fmt.Sprintf("sqs-queue-%s", acctest.RandString(5))

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Expand All @@ -27,23 +28,6 @@ func TestAccAWSSQSQueuePolicy_basic(t *testing.T) {
regexp.MustCompile("^{\"Version\":\"2012-10-17\".+")),
),
},
},
})
}

func TestAccAWSSQSQueuePolicy_import(t *testing.T) {
queueName := fmt.Sprintf("sqs-queue-%s", acctest.RandString(5))
resourceName := "aws_sqs_queue_policy.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSSQSQueueDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSSQSPolicyConfig_basic(queueName),
},

{
ResourceName: resourceName,
ImportState: true,
Expand Down

0 comments on commit 8bad05a

Please sign in to comment.