mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-16 03:32:54 -06:00
806c000dbb
Fixes #7495 ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSKmsKey_policy' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2016/09/06 10:44:20 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSKmsKey_policy -timeout 120m === RUN TestAccAWSKmsKey_importBasic --- PASS: TestAccAWSKmsKey_importBasic (166.19s) === RUN TestAccAWSKmsKey_basic --- PASS: TestAccAWSKmsKey_basic (215.33s) === RUN TestAccAWSKmsKey_policy --- PASS: TestAccAWSKmsKey_policy (116.81s) === RUN TestAccAWSKmsKey_isEnabled --- PASS: TestAccAWSKmsKey_isEnabled (1008.31s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 1689.957s ```
30 lines
644 B
Go
30 lines
644 B
Go
package aws
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
)
|
|
|
|
func TestAccAWSKmsKey_importBasic(t *testing.T) {
|
|
resourceName := "aws_kms_key.foo"
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testAccCheckAWSKmsKeyDestroy,
|
|
Steps: []resource.TestStep{
|
|
resource.TestStep{
|
|
Config: testAccAWSKmsKey,
|
|
},
|
|
|
|
resource.TestStep{
|
|
ResourceName: resourceName,
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
ImportStateVerifyIgnore: []string{"deletion_window_in_days"},
|
|
},
|
|
},
|
|
})
|
|
}
|