2016-07-10 23:33:02 +02:00
|
|
|
package azurerm
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAccAzureRMAvailabilitySet_importBasic(t *testing.T) {
|
|
|
|
resourceName := "azurerm_availability_set.test"
|
|
|
|
|
|
|
|
ri := acctest.RandInt()
|
|
|
|
config := fmt.Sprintf(testAccAzureRMVAvailabilitySet_basic, ri, ri)
|
|
|
|
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
Providers: testAccProviders,
|
|
|
|
CheckDestroy: testCheckAzureRMAvailabilitySetDestroy,
|
|
|
|
Steps: []resource.TestStep{
|
|
|
|
resource.TestStep{
|
|
|
|
Config: config,
|
|
|
|
},
|
|
|
|
|
|
|
|
resource.TestStep{
|
2016-09-28 11:54:22 +02:00
|
|
|
ResourceName: resourceName,
|
|
|
|
ImportState: true,
|
|
|
|
ImportStateVerify: true,
|
2016-07-10 23:33:02 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|