mirror of https://github.com/hashicorp/terraform
Fixes #9094 ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticacheReplicationGroup_importBasic' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2016/09/30 00:09:04 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSElasticacheReplicationGroup_importBasic -timeout 120m === RUN TestAccAWSElasticacheReplicationGroup_importBasic --- PASS: TestAccAWSElasticacheReplicationGroup_importBasic (756.38s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws756.398s ```pull/9140/head
parent
88c3554dda
commit
520f96e84b
@ -0,0 +1,37 @@
|
||||
package aws
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/acctest"
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
)
|
||||
|
||||
func TestAccAWSElasticacheReplicationGroup_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)
|
||||
|
||||
name := acctest.RandString(10)
|
||||
|
||||
resourceName := "aws_elasticache_replication_group.bar"
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccAWSElasticacheReplicationGroupConfig(name),
|
||||
},
|
||||
|
||||
resource.TestStep{
|
||||
ResourceName: resourceName,
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
ImportStateVerifyIgnore: []string{"apply_immediately"}, //not in the API
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
Loading…
Reference in new issue