github.com/recobe182/terraform@v0.8.5-0.20170117231232-49ab22a935b7/builtin/providers/aws/import_aws_sns_topic_subscription_test.go (about) 1 package aws 2 3 import ( 4 "testing" 5 6 "github.com/hashicorp/terraform/helper/acctest" 7 "github.com/hashicorp/terraform/helper/resource" 8 ) 9 10 func TestAccAWSSNSTopicSubscription_importBasic(t *testing.T) { 11 resourceName := "aws_sns_topic.test_topic" 12 ri := acctest.RandInt() 13 14 resource.Test(t, resource.TestCase{ 15 PreCheck: func() { testAccPreCheck(t) }, 16 Providers: testAccProviders, 17 CheckDestroy: testAccCheckAWSSNSTopicSubscriptionDestroy, 18 Steps: []resource.TestStep{ 19 resource.TestStep{ 20 Config: testAccAWSSNSTopicSubscriptionConfig(ri), 21 }, 22 23 resource.TestStep{ 24 ResourceName: resourceName, 25 ImportState: true, 26 ImportStateVerify: true, 27 }, 28 }, 29 }) 30 }