github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/builtin/providers/newrelic/import_newrelic_alert_channel_test.go (about) 1 package newrelic 2 3 import ( 4 "testing" 5 6 "github.com/hashicorp/terraform/helper/acctest" 7 "github.com/hashicorp/terraform/helper/resource" 8 ) 9 10 func TestAccNewRelicAlertChannel_import(t *testing.T) { 11 resourceName := "newrelic_alert_channel.foo" 12 rName := acctest.RandString(5) 13 resource.Test(t, resource.TestCase{ 14 PreCheck: func() { testAccPreCheck(t) }, 15 Providers: testAccProviders, 16 CheckDestroy: testAccCheckNewRelicAlertChannelDestroy, 17 Steps: []resource.TestStep{ 18 resource.TestStep{ 19 Config: testAccCheckNewRelicAlertChannelConfig(rName), 20 }, 21 22 resource.TestStep{ 23 ResourceName: resourceName, 24 ImportState: true, 25 ImportStateVerify: true, 26 }, 27 }, 28 }) 29 }