Skip to content

Commit

Permalink
CDPSDX-3108 fix subnet natGateway validation (#7)
Browse files Browse the repository at this point in the history
Signed-off-by: Mahendra Korepu <[email protected]>
  • Loading branch information
mahendra-rk authored Aug 9, 2021
1 parent 2c1103e commit f02b684
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cdpctl/validation/infra/validate_aws_subnets.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ def aws_private_subnets_route_validation(
for route_table in subnets_route_tables:
routes = route_table["Routes"]
for route in routes:
if "GatewayId" in route:
gateway_ids.append(route["GatewayId"])
if "NatGatewayId" in route:
gateway_ids.append(route["NatGatewayId"])
else:
pytest.fail(
f"""Provided Subnets {subnets_data["private_subnets_ids"]} and
Expand Down
2 changes: 1 addition & 1 deletion tests/validation/infra/test_validate_aws_subnets.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ def test_aws_private_subnets_route_validation_success(ec2_client: EC2Client) ->
"Routes": [
{
"DestinationIpv6CidrBlock": "::/0",
"GatewayId": "nat-test1234566789",
"NatGatewayId": "nat-test1234566789",
"Origin": "CreateRoute",
"State": "active",
},
Expand Down

0 comments on commit f02b684

Please sign in to comment.