github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/builtin/providers/datadog/import_datadog_user_test.go (about) 1 package datadog 2 3 import ( 4 "testing" 5 6 "github.com/hashicorp/terraform/helper/resource" 7 ) 8 9 func TestDatadogUser_import(t *testing.T) { 10 resourceName := "datadog_user.foo" 11 12 resource.Test(t, resource.TestCase{ 13 PreCheck: func() { testAccPreCheck(t) }, 14 Providers: testAccProviders, 15 CheckDestroy: testAccCheckDatadogUserDestroy, 16 Steps: []resource.TestStep{ 17 resource.TestStep{ 18 Config: testAccCheckDatadogUserConfigImported, 19 }, 20 resource.TestStep{ 21 ResourceName: resourceName, 22 ImportState: true, 23 ImportStateVerify: true, 24 }, 25 }, 26 }) 27 } 28 29 const testAccCheckDatadogUserConfigImported = ` 30 resource "datadog_user" "foo" { 31 email = "test@example.com" 32 handle = "test@example.com" 33 name = "Test User" 34 } 35 `