github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/builtin/providers/opc/import_storage_volume_snapshot_test.go (about)

     1  package opc
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/hashicorp/terraform/helper/acctest"
     7  	"github.com/hashicorp/terraform/helper/resource"
     8  )
     9  
    10  func TestAccOPCStorageVolumeSnapshot_importBasic(t *testing.T) {
    11  	resourceName := "opc_compute_storage_volume_snapshot.test"
    12  	rInt := acctest.RandInt()
    13  
    14  	resource.Test(t, resource.TestCase{
    15  		PreCheck:     func() { testAccPreCheck(t) },
    16  		Providers:    testAccProviders,
    17  		CheckDestroy: opcResourceCheck(resourceName, testAccCheckStorageVolumeSnapshotDestroyed),
    18  		Steps: []resource.TestStep{
    19  			{
    20  				Config: testAccStorageVolumeSnapshot_basic(rInt),
    21  			},
    22  			{
    23  				ResourceName:      resourceName,
    24  				ImportState:       true,
    25  				ImportStateVerify: true,
    26  			},
    27  		},
    28  	})
    29  }