package newrelic import ( "testing" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" ) func TestAccNewRelicAlertPolicy_import(t *testing.T) { resourceName := "newrelic_alert_policy.foo" rName := acctest.RandString(5) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckNewRelicAlertPolicyDestroy, Steps: []resource.TestStep{ resource.TestStep{ Config: testAccCheckNewRelicAlertPolicyConfig(rName), }, resource.TestStep{ ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, }, }) }