terraform-provider-greenhost/digitalocean/import_digitalocean_loadbal...

31 lines
696 B
Go
Raw Normal View History

package digitalocean
import (
"testing"
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccDigitalOceanLoadBalancer_importBasic(t *testing.T) {
resourceName := "digitalocean_loadbalancer.foobar"
rInt := acctest.RandInt()
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckDigitalOceanLoadbalancerDestroy,
Steps: []resource.TestStep{
{
Config: testAccCheckDigitalOceanLoadbalancerConfig_basic(rInt),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}