Skip to content

Commit

Permalink
Adding an import test
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Oct 25, 2016
1 parent e7bf431 commit b0e9c78
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions builtin/providers/azurerm/import_arm_eventhub_namespace_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package azurerm

import (
"testing"

"fmt"
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)

func TestAccAzureRMEventHubNamespace_importBasic(t *testing.T) {
resourceName := "azurerm_eventhub_namespace.test"

ri := acctest.RandInt()
config := fmt.Sprintf(testAccAzureRMEventHubNamespace_basic, ri, ri)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMEventHubNamespaceDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: config,
},

resource.TestStep{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}

0 comments on commit b0e9c78

Please sign in to comment.