github.com/koding/terraform@v0.6.4-0.20170608090606-5d7e0339779d/builtin/providers/google/import_compute_router_peer_test.go (about)

     1  package google
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/hashicorp/terraform/helper/acctest"
     7  	"github.com/hashicorp/terraform/helper/resource"
     8  )
     9  
    10  func TestAccComputeRouterPeer_import(t *testing.T) {
    11  	resourceName := "google_compute_router_peer.foobar"
    12  	testId := acctest.RandString(10)
    13  	resource.Test(t, resource.TestCase{
    14  		PreCheck:  func() { testAccPreCheck(t) },
    15  		Providers: testAccProviders,
    16  		Steps: []resource.TestStep{
    17  			resource.TestStep{
    18  				Config: testAccComputeRouterPeerBasic(testId),
    19  			},
    20  
    21  			resource.TestStep{
    22  				ResourceName:      resourceName,
    23  				ImportState:       true,
    24  				ImportStateVerify: true,
    25  			},
    26  		},
    27  	})
    28  }