Skip to content

Commit

Permalink
Merge pull request #14014 from ewbankkit/t-additional-aws_route-tests
Browse files Browse the repository at this point in the history
r/aws_route: Refactor acceptance tests in preparation for future fixes/enhancements
  • Loading branch information
YakDriver authored Mar 25, 2021
2 parents e5d2257 + 4406339 commit 48fefb7
Show file tree
Hide file tree
Showing 2 changed files with 1,313 additions and 699 deletions.
4 changes: 0 additions & 4 deletions aws/data_source_aws_route_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ func TestAccAWSRouteDataSource_basic(t *testing.T) {
}

func TestAccAWSRouteDataSource_TransitGatewayID(t *testing.T) {
var route ec2.Route
dataSourceName := "data.aws_route.test"
resourceName := "aws_route.test"
rName := acctest.RandomWithPrefix("tf-acc-test")
Expand All @@ -62,7 +61,6 @@ func TestAccAWSRouteDataSource_TransitGatewayID(t *testing.T) {
{
Config: testAccAWSRouteDataSourceConfigIpv4TransitGateway(rName),
Check: resource.ComposeTestCheckFunc(
testAccCheckAWSRouteExists(resourceName, &route),
resource.TestCheckResourceAttrPair(resourceName, "destination_cidr_block", dataSourceName, "destination_cidr_block"),
resource.TestCheckResourceAttrPair(resourceName, "route_table_id", dataSourceName, "route_table_id"),
resource.TestCheckResourceAttrPair(resourceName, "transit_gateway_id", dataSourceName, "transit_gateway_id"),
Expand Down Expand Up @@ -95,7 +93,6 @@ func TestAccAWSRouteDataSource_IPv6DestinationCidr(t *testing.T) {
}

func TestAccAWSRouteDataSource_LocalGatewayID(t *testing.T) {
var route ec2.Route
dataSourceName := "data.aws_route.by_local_gateway_id"
resourceName := "aws_route.test"
rName := acctest.RandomWithPrefix("tf-acc-test")
Expand All @@ -109,7 +106,6 @@ func TestAccAWSRouteDataSource_LocalGatewayID(t *testing.T) {
{
Config: testAccAWSRouteDataSourceConfigIpv4LocalGateway(rName),
Check: resource.ComposeTestCheckFunc(
testAccCheckAWSRouteExists(resourceName, &route),
resource.TestCheckResourceAttrPair(resourceName, "destination_cidr_block", dataSourceName, "destination_cidr_block"),
resource.TestCheckResourceAttrPair(resourceName, "route_table_id", dataSourceName, "route_table_id"),
resource.TestCheckResourceAttrPair(resourceName, "local_gateway_id", dataSourceName, "local_gateway_id"),
Expand Down
Loading

0 comments on commit 48fefb7

Please sign in to comment.