From aa9c420586f6d0e5a4fac4f004cac5aa95876357 Mon Sep 17 00:00:00 2001 From: clint shryock Date: Thu, 20 Oct 2016 16:16:01 -0500 Subject: [PATCH] slight rename and sorting of test --- .../aws/resource_aws_vpc_endpoint_test.go | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/builtin/providers/aws/resource_aws_vpc_endpoint_test.go b/builtin/providers/aws/resource_aws_vpc_endpoint_test.go index 5c59e2221..673435dab 100644 --- a/builtin/providers/aws/resource_aws_vpc_endpoint_test.go +++ b/builtin/providers/aws/resource_aws_vpc_endpoint_test.go @@ -61,6 +61,26 @@ func TestAccAWSVpcEndpoint_withRouteTableAndPolicy(t *testing.T) { }) } +func TestAccAWSVpcEndpoint_WithoutRouteTableOrPolicyConfig(t *testing.T) { + var endpoint ec2.VpcEndpoint + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_vpc_endpoint.second-private-s3", + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcEndpointDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccVpcEndpointWithoutRouteTableOrPolicyConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckVpcEndpointExists("aws_vpc_endpoint.second-private-s3", &endpoint), + testAccCheckVpcEndpointPrefixListAvailable("aws_vpc_endpoint.second-private-s3"), + ), + }, + }, + }) +} + func testAccCheckVpcEndpointDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn @@ -139,26 +159,6 @@ func testAccCheckVpcEndpointPrefixListAvailable(n string) resource.TestCheckFunc } } -func TestAccAWSVpcEndpointWithoutRouteTableOrPolicyConfig(t *testing.T) { - var endpoint ec2.VpcEndpoint - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_vpc_endpoint.second-private-s3", - Providers: testAccProviders, - CheckDestroy: testAccCheckVpcEndpointDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccVpcEndpointWithoutRouteTableOrPolicyConfig, - Check: resource.ComposeTestCheckFunc( - testAccCheckVpcEndpointExists("aws_vpc_endpoint.second-private-s3", &endpoint), - testAccCheckVpcEndpointPrefixListAvailable("aws_vpc_endpoint.second-private-s3"), - ), - }, - }, - }) -} - const testAccVpcEndpointWithRouteTableAndPolicyConfig = ` resource "aws_vpc" "foo" { cidr_block = "10.0.0.0/16"