2017-01-27 15:32:42 +01:00
|
|
|
package google
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAccComputeRouter_import(t *testing.T) {
|
|
|
|
resourceName := "google_compute_router.foobar"
|
2017-05-19 20:18:23 +02:00
|
|
|
resourceRegion := "europe-west1"
|
2017-01-27 15:32:42 +01:00
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
Providers: testAccProviders,
|
|
|
|
CheckDestroy: testAccCheckComputeRouterDestroy,
|
|
|
|
Steps: []resource.TestStep{
|
|
|
|
resource.TestStep{
|
2017-05-19 20:18:23 +02:00
|
|
|
Config: testAccComputeRouterBasic(resourceRegion),
|
2017-01-27 15:32:42 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
resource.TestStep{
|
|
|
|
ResourceName: resourceName,
|
|
|
|
ImportState: true,
|
|
|
|
ImportStateVerify: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|