From d69b5e177d47b9471dcd38835fa7dc2413a724d1 Mon Sep 17 00:00:00 2001 From: kondo takeshi Date: Wed, 24 Jul 2019 00:58:55 +0900 Subject: [PATCH] Add import state to All TestAccAWSCloudWatchEventTarget test --- ...source_aws_cloudwatch_event_target_test.go | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/aws/resource_aws_cloudwatch_event_target_test.go b/aws/resource_aws_cloudwatch_event_target_test.go index ca22b2bf203..422de8d158f 100644 --- a/aws/resource_aws_cloudwatch_event_target_test.go +++ b/aws/resource_aws_cloudwatch_event_target_test.go @@ -153,6 +153,12 @@ func TestAccAWSCloudWatchEventTarget_missingTargetId(t *testing.T) { regexp.MustCompile(fmt.Sprintf(":%s$", snsTopicName))), ), }, + { + ResourceName: "aws_cloudwatch_event_target.moobar", + ImportState: true, + ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc("aws_cloudwatch_event_target.moobar"), + ImportStateVerify: true, + }, }, }) } @@ -181,6 +187,12 @@ func TestAccAWSCloudWatchEventTarget_full(t *testing.T) { resource.TestCheckResourceAttr("aws_cloudwatch_event_target.foobar", "input_path", ""), ), }, + { + ResourceName: "aws_cloudwatch_event_target.foobar", + ImportState: true, + ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc("aws_cloudwatch_event_target.foobar"), + ImportStateVerify: true, + }, }, }) } @@ -200,6 +212,12 @@ func TestAccAWSCloudWatchEventTarget_ssmDocument(t *testing.T) { testAccCheckCloudWatchEventTargetExists("aws_cloudwatch_event_target.test", &target), ), }, + { + ResourceName: "aws_cloudwatch_event_target.test", + ImportState: true, + ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc("aws_cloudwatch_event_target.test"), + ImportStateVerify: true, + }, }, }) } @@ -219,6 +237,12 @@ func TestAccAWSCloudWatchEventTarget_ecs(t *testing.T) { testAccCheckCloudWatchEventTargetExists("aws_cloudwatch_event_target.test", &target), ), }, + { + ResourceName: "aws_cloudwatch_event_target.test", + ImportState: true, + ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc("aws_cloudwatch_event_target.test"), + ImportStateVerify: true, + }, }, }) } @@ -238,6 +262,12 @@ func TestAccAWSCloudWatchEventTarget_batch(t *testing.T) { testAccCheckCloudWatchEventTargetExists("aws_cloudwatch_event_target.test", &target), ), }, + { + ResourceName: "aws_cloudwatch_event_target.test", + ImportState: true, + ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc("aws_cloudwatch_event_target.test"), + ImportStateVerify: true, + }, }, }) } @@ -257,6 +287,12 @@ func TestAccAWSCloudWatchEventTarget_kinesis(t *testing.T) { testAccCheckCloudWatchEventTargetExists("aws_cloudwatch_event_target.test", &target), ), }, + { + ResourceName: "aws_cloudwatch_event_target.test", + ImportState: true, + ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc("aws_cloudwatch_event_target.test"), + ImportStateVerify: true, + }, }, }) } @@ -276,6 +312,12 @@ func TestAccAWSCloudWatchEventTarget_sqs(t *testing.T) { testAccCheckCloudWatchEventTargetExists("aws_cloudwatch_event_target.test", &target), ), }, + { + ResourceName: "aws_cloudwatch_event_target.test", + ImportState: true, + ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc("aws_cloudwatch_event_target.test"), + ImportStateVerify: true, + }, }, }) } @@ -295,6 +337,12 @@ func TestAccAWSCloudWatchEventTarget_input_transformer(t *testing.T) { testAccCheckCloudWatchEventTargetExists("aws_cloudwatch_event_target.test", &target), ), }, + { + ResourceName: "aws_cloudwatch_event_target.test", + ImportState: true, + ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc("aws_cloudwatch_event_target.test"), + ImportStateVerify: true, + }, }, }) }