2016-07-13 13:08:44 +02:00
|
|
|
package azurerm
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAccAzureRMStorageAccount_importBasic(t *testing.T) {
|
|
|
|
resourceName := "azurerm_storage_account.testsa"
|
|
|
|
|
|
|
|
ri := acctest.RandInt()
|
|
|
|
rs := acctest.RandString(4)
|
|
|
|
config := fmt.Sprintf(testAccAzureRMStorageAccount_basic, ri, rs)
|
|
|
|
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
Providers: testAccProviders,
|
|
|
|
CheckDestroy: testCheckAzureRMStorageAccountDestroy,
|
|
|
|
Steps: []resource.TestStep{
|
|
|
|
resource.TestStep{
|
|
|
|
Config: config,
|
|
|
|
},
|
|
|
|
|
|
|
|
resource.TestStep{
|
2016-09-27 16:30:48 +02:00
|
|
|
ResourceName: resourceName,
|
|
|
|
ImportState: true,
|
|
|
|
ImportStateVerify: true,
|
2016-07-13 13:08:44 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|