Skip to content

Commit

Permalink
Add import state to All TestAccAWSCloudWatchEventTarget test
Browse files Browse the repository at this point in the history
  • Loading branch information
chaspy committed Jul 23, 2019
1 parent 70b5e91 commit d69b5e1
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions aws/resource_aws_cloudwatch_event_target_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
})
}
Expand Down Expand Up @@ -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,
},
},
})
}
Expand All @@ -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,
},
},
})
}
Expand All @@ -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,
},
},
})
}
Expand All @@ -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,
},
},
})
}
Expand All @@ -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,
},
},
})
}
Expand All @@ -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,
},
},
})
}
Expand All @@ -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,
},
},
})
}
Expand Down

0 comments on commit d69b5e1

Please sign in to comment.