From e223ec4b40b7f0777c12414ef9ff9a3e24cdfdf3 Mon Sep 17 00:00:00 2001 From: Paul Stack Date: Fri, 10 Feb 2017 17:51:44 +0000 Subject: [PATCH] provider/aws: Remove commented out test codethat causes panic in (#11859) CI --- .../providers/aws/resource_aws_route_test.go | 62 ------------------- 1 file changed, 62 deletions(-) diff --git a/builtin/providers/aws/resource_aws_route_test.go b/builtin/providers/aws/resource_aws_route_test.go index cf0ef0781..d7a2c0b99 100644 --- a/builtin/providers/aws/resource_aws_route_test.go +++ b/builtin/providers/aws/resource_aws_route_test.go @@ -176,68 +176,6 @@ func TestAccAWSRoute_doesNotCrashWithVPCEndpoint(t *testing.T) { }) } -// Acceptance test if mixed inline and external routes are implemented -/* -func TestAccAWSRoute_mix(t *testing.T) { - var rt ec2.RouteTable - var route ec2.Route - - //aws creates a default route - testCheck := func(s *terraform.State) error { - if *route.DestinationCidrBlock != "0.0.0.0/0" { - return fmt.Errorf("Destination Cidr (Expected=%s, Actual=%s)\n", "0.0.0.0/0", *route.DestinationCidrBlock) - } - - name := "aws_internet_gateway.foo" - gwres, ok := s.RootModule().Resources[name] - if !ok { - return fmt.Errorf("Not found: %s\n", name) - } - - if *route.GatewayId != gwres.Primary.ID { - return fmt.Errorf("Internet Gateway Id (Expected=%s, Actual=%s)\n", gwres.Primary.ID, *route.GatewayId) - } - - if len(rt.Routes) != 3 { - return fmt.Errorf("bad routes: %#v", rt.Routes) - } - - routes := make(map[string]*ec2.Route) - for _, r := range rt.Routes { - routes[*r.DestinationCidrBlock] = r - } - - if _, ok := routes["10.1.0.0/16"]; !ok { - return fmt.Errorf("Missing route %s: %#v", "10.1.0.0/16", rt.Routes) - } - if _, ok := routes["10.2.0.0/16"]; !ok { - return fmt.Errorf("Missing route %s: %#v", "10.2.0.0/16", rt.Routes) - } - if _, ok := routes["0.0.0.0/0"]; !ok { - return fmt.Errorf("Missing route %s: %#v", "0.0.0.0/0", rt.Routes) - } - - return nil - } - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSRouteDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccAWSRouteMixConfig, - Check: resource.ComposeTestCheckFunc( - testAccCheckRouteTableExists("aws_route_table.foo", &rt), - testAccCheckAWSRouteExists("aws_route.bar", &route), - testCheck, - ), - }, - }, - }) -} -*/ - func testAccCheckAWSRouteExists(n string, res *ec2.Route) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n]