mirror of https://github.com/hashicorp/terraform
Merge branch 'elasticache-cluster-import' of https://github.com/AMeng/terraform into AMeng-elasticache-cluster-import
commit
cea685099e
@ -0,0 +1,33 @@
|
||||
package aws
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
)
|
||||
|
||||
func TestAccAWSElasticacheCluster_importBasic(t *testing.T) {
|
||||
oldvar := os.Getenv("AWS_DEFAULT_REGION")
|
||||
os.Setenv("AWS_DEFAULT_REGION", "us-east-1")
|
||||
defer os.Setenv("AWS_DEFAULT_REGION", oldvar)
|
||||
|
||||
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,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
Loading…
Reference in new issue