terraform/builtin/providers/azurerm/import_arm_route_test.go

34 lines
704 B
Go

package azurerm
import (
"fmt"
"testing"
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccAzureRMRoute_importBasic(t *testing.T) {
resourceName := "azurerm_route.test"
ri := acctest.RandInt()
config := fmt.Sprintf(testAccAzureRMRoute_basic, ri, ri, ri)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMRouteDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: config,
},
resource.TestStep{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}