mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-09 23:54:17 -06:00
3332f757cb
``` make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSVpcEndpoint_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /vendor/) TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSVpcEndpoint_ -timeout 120m === RUN TestAccAWSVpcEndpoint_importBasic --- PASS: TestAccAWSVpcEndpoint_importBasic (45.90s) === RUN TestAccAWSVpcEndpoint_basic --- PASS: TestAccAWSVpcEndpoint_basic (46.64s) === RUN TestAccAWSVpcEndpoint_withRouteTableAndPolicy --- PASS: TestAccAWSVpcEndpoint_withRouteTableAndPolicy (91.91s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 184.470s ```
29 lines
617 B
Go
29 lines
617 B
Go
package aws
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
)
|
|
|
|
func TestAccAWSVpcEndpoint_importBasic(t *testing.T) {
|
|
resourceName := "aws_vpc_endpoint.second-private-s3"
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testAccCheckVpcEndpointDestroy,
|
|
Steps: []resource.TestStep{
|
|
resource.TestStep{
|
|
Config: testAccVpcEndpointWithRouteTableAndPolicyConfig,
|
|
},
|
|
|
|
resource.TestStep{
|
|
ResourceName: resourceName,
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
},
|
|
},
|
|
})
|
|
}
|