Skip to content

Commit

Permalink
Merge pull request #864 from dtbartle/aws-sdk-v1
Browse files Browse the repository at this point in the history
DestinationCidrBlock isn't returned for VPC endpoint routes.
  • Loading branch information
trevorrowe committed Jul 13, 2015
2 parents f5a3664 + 0185430 commit ec62950
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/aws/ec2/route_table/route.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def initialize route_table, details

@route_table = route_table

@destination_cidr_block = details.destination_cidr_block
if details[:destination_cidr_block]
@destination_cidr_block = details.destination_cidr_block
end

if details[:gateway_id]
@internet_gateway = InternetGateway.new(
Expand Down
10 changes: 10 additions & 0 deletions spec/aws/ec2/route_table_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ def stub_tags(resp, tags)
:state => 'foo',
}

route_set << {
:gateway_id => 'vpce-123',
:state => 'active',
:origin => 'CreateRoute',
}

routes = route_table.routes

routes[0].destination_cidr_block.should == 'cidr-block-1'
Expand All @@ -283,6 +289,10 @@ def stub_tags(resp, tags)
routes[2].state.should == :foo
routes[2].target.should == routes[2].network_interface

routes[3].target.should == InternetGateway.new('vpce-123', :config => config)
routes[3].state.should == :active
routes[3].origin.should == :create_route

end

end
Expand Down

0 comments on commit ec62950

Please sign in to comment.