mirror of https://github.com/hashicorp/terraform
Previously, the `stage_key` were not being set back to state in the Read func. Changing this means the tests now run as follows: ``` make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAPIGatewayApiKey_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /vendor/) TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAPIGatewayApiKey_ -timeout 120m === RUN TestAccAWSAPIGatewayApiKey_importBasic --- PASS: TestAccAWSAPIGatewayApiKey_importBasic (42.42s) === RUN TestAccAWSAPIGatewayApiKey_basic --- PASS: TestAccAWSAPIGatewayApiKey_basic (42.11s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 84.549s ```pull/7589/head
parent
ea4483d8b6
commit
ceeab2ad12
@ -0,0 +1,28 @@
|
||||
package aws
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
)
|
||||
|
||||
func TestAccAWSAPIGatewayApiKey_importBasic(t *testing.T) {
|
||||
resourceName := "aws_api_gateway_api_key.test"
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckAWSAPIGatewayApiKeyDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccAWSAPIGatewayApiKeyConfig,
|
||||
},
|
||||
|
||||
resource.TestStep{
|
||||
ResourceName: resourceName,
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
Loading…
Reference in new issue