opentofu/builtin/providers/aws/import_aws_simpledb_domain_test.go
Paul Stack 7a58ad95f5 provider/aws: Support Import for aws_simpledb_domain (#7601)
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSimpleDBDomain_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSSimpleDBDomain_ -timeout 120m
=== RUN   TestAccAWSSimpleDBDomain_importBasic
--- PASS: TestAccAWSSimpleDBDomain_importBasic (19.59s)
=== RUN   TestAccAWSSimpleDBDomain_basic
--- PASS: TestAccAWSSimpleDBDomain_basic (19.93s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    39.535s
```
2016-07-12 13:15:47 +01:00

29 lines
606 B
Go

package aws
import (
"testing"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccAWSSimpleDBDomain_importBasic(t *testing.T) {
resourceName := "aws_simpledb_domain.test_domain"
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSSimpleDBDomainDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccAWSSimpleDBDomainConfig,
},
resource.TestStep{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}