terraform/builtin/providers/newrelic/import_newrelic_alert_condi...

31 lines
711 B
Go

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