Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
DrFaust92 committed Nov 2, 2019
1 parent b7de74f commit 3ec9b5e
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions aws/resource_aws_api_gateway_vpc_link_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ func TestAccAWSAPIGatewayVpcLink_basic(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "target_arns.#", "1"),
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
{
Config: testAccAPIGatewayVpcLinkConfig_Update(rName, "test update"),
Check: resource.ComposeTestCheckFunc(
Expand Down Expand Up @@ -116,6 +121,11 @@ func TestAccAWSAPIGatewayVpcLink_tags(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"),
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
{
Config: testAccAPIGatewayVpcLinkConfigTags2(rName, description, "key1", "value1updated", "key2", "value2"),
Check: resource.ComposeTestCheckFunc(
Expand Down Expand Up @@ -143,28 +153,6 @@ func TestAccAWSAPIGatewayVpcLink_tags(t *testing.T) {
})
}

func TestAccAWSAPIGatewayVpcLink_importBasic(t *testing.T) {
rName := acctest.RandString(5)
resourceName := "aws_api_gateway_vpc_link.test"
description := "test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsAPIGatewayVpcLinkDestroy,
Steps: []resource.TestStep{
{
Config: testAccAPIGatewayVpcLinkConfig(rName, description),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccCheckAwsAPIGatewayVpcLinkDestroy(s *terraform.State) error {
conn := testAccProvider.Meta().(*AWSClient).apigateway

Expand Down

0 comments on commit 3ec9b5e

Please sign in to comment.