2016-08-19 19:10:57 +02:00
|
|
|
package aws
|
|
|
|
|
|
|
|
import (
|
2016-08-19 20:32:38 +02:00
|
|
|
"os"
|
2016-08-19 19:10:57 +02:00
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAccAWSElasticacheCluster_importBasic(t *testing.T) {
|
2016-08-19 20:32:38 +02:00
|
|
|
oldvar := os.Getenv("AWS_DEFAULT_REGION")
|
|
|
|
os.Setenv("AWS_DEFAULT_REGION", "us-east-1")
|
|
|
|
defer os.Setenv("AWS_DEFAULT_REGION", oldvar)
|
|
|
|
|
2016-08-19 19:10:57 +02:00
|
|
|
resourceName := "aws_elasticache_cluster.bar"
|
|
|
|
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
Providers: testAccProviders,
|
|
|
|
CheckDestroy: testAccCheckAWSElasticacheClusterDestroy,
|
|
|
|
Steps: []resource.TestStep{
|
|
|
|
resource.TestStep{
|
|
|
|
Config: testAccAWSElasticacheClusterConfig,
|
|
|
|
},
|
|
|
|
|
|
|
|
resource.TestStep{
|
|
|
|
ResourceName: resourceName,
|
|
|
|
ImportState: true,
|
|
|
|
ImportStateVerify: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|