35 lines
733 B
Go
35 lines
733 B
Go
|
package openstack
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/hashicorp/terraform/helper/resource"
|
||
|
)
|
||
|
|
||
|
func TestAccImagesImageV2_importBasic(t *testing.T) {
|
||
|
resourceName := "openstack_images_image_v2.foo"
|
||
|
|
||
|
resource.Test(t, resource.TestCase{
|
||
|
PreCheck: func() { testAccPreCheck(t) },
|
||
|
Providers: testAccProviders,
|
||
|
CheckDestroy: testAccCheckImagesImageV2Destroy,
|
||
|
Steps: []resource.TestStep{
|
||
|
resource.TestStep{
|
||
|
Config: testAccImagesImageV2_basic,
|
||
|
},
|
||
|
|
||
|
resource.TestStep{
|
||
|
ResourceName: resourceName,
|
||
|
ImportState: true,
|
||
|
ImportStateVerify: true,
|
||
|
ImportStateVerifyIgnore: []string{
|
||
|
"region",
|
||
|
"local_file_path",
|
||
|
"image_cache_path",
|
||
|
"image_source_url",
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
})
|
||
|
}
|