github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/builtin/providers/azurerm/import_arm_eventhub_namespace_test.go (about) 1 package azurerm 2 3 import ( 4 "testing" 5 6 "fmt" 7 "github.com/hashicorp/terraform/helper/acctest" 8 "github.com/hashicorp/terraform/helper/resource" 9 ) 10 11 func TestAccAzureRMEventHubNamespace_importBasic(t *testing.T) { 12 resourceName := "azurerm_eventhub_namespace.test" 13 14 ri := acctest.RandInt() 15 config := fmt.Sprintf(testAccAzureRMEventHubNamespace_basic, ri, ri) 16 17 resource.Test(t, resource.TestCase{ 18 PreCheck: func() { testAccPreCheck(t) }, 19 Providers: testAccProviders, 20 CheckDestroy: testCheckAzureRMEventHubNamespaceDestroy, 21 Steps: []resource.TestStep{ 22 resource.TestStep{ 23 Config: config, 24 }, 25 26 resource.TestStep{ 27 ResourceName: resourceName, 28 ImportState: true, 29 ImportStateVerify: true, 30 }, 31 }, 32 }) 33 }