github.com/koding/terraform@v0.6.4-0.20170608090606-5d7e0339779d/builtin/providers/azurerm/import_arm_container_registry_test.go (about) 1 package azurerm 2 3 import ( 4 "testing" 5 6 "github.com/hashicorp/terraform/helper/acctest" 7 "github.com/hashicorp/terraform/helper/resource" 8 ) 9 10 func TestAccAzureRMContainerRegistry_importBasic(t *testing.T) { 11 resourceName := "azurerm_container_registry.test" 12 13 ri := acctest.RandInt() 14 rs := acctest.RandString(4) 15 config := testAccAzureRMContainerRegistry_basic(ri, rs) 16 17 resource.Test(t, resource.TestCase{ 18 PreCheck: func() { testAccPreCheck(t) }, 19 Providers: testAccProviders, 20 CheckDestroy: testCheckAzureRMContainerRegistryDestroy, 21 Steps: []resource.TestStep{ 22 { 23 Config: config, 24 }, 25 26 { 27 ResourceName: resourceName, 28 ImportState: true, 29 ImportStateVerify: true, 30 ImportStateVerifyIgnore: []string{"storage_account"}, 31 }, 32 }, 33 }) 34 } 35 36 func TestAccAzureRMContainerRegistry_importComplete(t *testing.T) { 37 resourceName := "azurerm_container_registry.test" 38 39 ri := acctest.RandInt() 40 rs := acctest.RandString(4) 41 config := testAccAzureRMContainerRegistry_complete(ri, rs) 42 43 resource.Test(t, resource.TestCase{ 44 PreCheck: func() { testAccPreCheck(t) }, 45 Providers: testAccProviders, 46 CheckDestroy: testCheckAzureRMContainerRegistryDestroy, 47 Steps: []resource.TestStep{ 48 { 49 Config: config, 50 }, 51 52 { 53 ResourceName: resourceName, 54 ImportState: true, 55 ImportStateVerify: true, 56 ImportStateVerifyIgnore: []string{"storage_account"}, 57 }, 58 }, 59 }) 60 }