31 lines
696 B
Go
31 lines
696 B
Go
|
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,
|
||
|
},
|
||
|
},
|
||
|
})
|
||
|
}
|