github.com/richardbowden/terraform@v0.6.12-0.20160901200758-30ea22c25211/builtin/providers/digitalocean/import_digitalocean_droplet_test.go (about) 1 package digitalocean 2 3 import ( 4 "testing" 5 6 "github.com/hashicorp/terraform/helper/resource" 7 ) 8 9 func TestAccDigitalOceanDroplet_importBasic(t *testing.T) { 10 resourceName := "digitalocean_droplet.foobar" 11 12 resource.Test(t, resource.TestCase{ 13 PreCheck: func() { testAccPreCheck(t) }, 14 Providers: testAccProviders, 15 CheckDestroy: testAccCheckDigitalOceanDropletDestroy, 16 Steps: []resource.TestStep{ 17 resource.TestStep{ 18 Config: testAccCheckDigitalOceanDropletConfig_basic, 19 }, 20 21 resource.TestStep{ 22 ResourceName: resourceName, 23 ImportState: true, 24 ImportStateVerify: true, 25 ImportStateVerifyIgnore: []string{ 26 "ssh_keys", "user_data"}, //we ignore the ssh_keys and user_data as we do not set to state 27 }, 28 }, 29 }) 30 }