2017-01-27 14:32:42 +00:00
|
|
|
package google
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2017-04-28 19:17:08 +00:00
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
2017-01-27 14:32:42 +00:00
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAccComputeRouterPeer_import(t *testing.T) {
|
2017-10-10 23:28:00 +00:00
|
|
|
t.Parallel()
|
|
|
|
|
2017-01-27 14:32:42 +00:00
|
|
|
resourceName := "google_compute_router_peer.foobar"
|
2017-05-19 18:18:23 +00:00
|
|
|
testId := acctest.RandString(10)
|
2017-01-27 14:32:42 +00:00
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
Providers: testAccProviders,
|
|
|
|
Steps: []resource.TestStep{
|
|
|
|
resource.TestStep{
|
2017-05-19 18:18:23 +00:00
|
|
|
Config: testAccComputeRouterPeerBasic(testId),
|
2017-01-27 14:32:42 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
resource.TestStep{
|
|
|
|
ResourceName: resourceName,
|
|
|
|
ImportState: true,
|
|
|
|
ImportStateVerify: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|