github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/builtin/providers/azurerm/import_arm_managed_disk_test.go (about)

     1  package azurerm
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  
     7  	"github.com/hashicorp/terraform/helper/acctest"
     8  	"github.com/hashicorp/terraform/helper/resource"
     9  )
    10  
    11  func TestAccAzureRMManagedDisk_importEmpty(t *testing.T) {
    12  	ri := acctest.RandInt()
    13  	config := fmt.Sprintf(testAccAzureRMManagedDisk_empty, ri, ri)
    14  
    15  	resource.Test(t, resource.TestCase{
    16  		PreCheck:     func() { testAccPreCheck(t) },
    17  		Providers:    testAccProviders,
    18  		CheckDestroy: testCheckAzureRMManagedDiskDestroy,
    19  		Steps: []resource.TestStep{
    20  			{
    21  				Config: config,
    22  			},
    23  			{
    24  				ResourceName:      "azurerm_managed_disk.test",
    25  				ImportState:       true,
    26  				ImportStateVerify: true,
    27  			},
    28  		},
    29  	})
    30  }