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

     1  package openstack
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/hashicorp/terraform/helper/resource"
     7  )
     8  
     9  func TestAccImagesImageV2_importBasic(t *testing.T) {
    10  	resourceName := "openstack_images_image_v2.image_1"
    11  
    12  	resource.Test(t, resource.TestCase{
    13  		PreCheck:     func() { testAccPreCheck(t) },
    14  		Providers:    testAccProviders,
    15  		CheckDestroy: testAccCheckImagesImageV2Destroy,
    16  		Steps: []resource.TestStep{
    17  			resource.TestStep{
    18  				Config: testAccImagesImageV2_basic,
    19  			},
    20  
    21  			resource.TestStep{
    22  				ResourceName:      resourceName,
    23  				ImportState:       true,
    24  				ImportStateVerify: true,
    25  				ImportStateVerifyIgnore: []string{
    26  					"region",
    27  					"local_file_path",
    28  					"image_cache_path",
    29  					"image_source_url",
    30  				},
    31  			},
    32  		},
    33  	})
    34  }