Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acceptance test import refactor for SQS queue policy #9958

Merged
merged 1 commit into from
Sep 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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