Fix: handling of boolean value privateDnsEnabled in ec2:VpcEndpoint (#3566)

* Properly coerce `privateDnsEnabled` to boolean value when parsing requests.
* Per AWS spec, default `privateDnsEnabled` request value to `True`.
* Properly serialize `privateDnsEnabled` as boolean value in responses.
* Add test coverage.

Ref: #3540
This commit is contained in:
Brian Pandola 2021-01-08 00:05:44 -08:00 committed by GitHub
commit 1a98c4f14a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -885,6 +885,11 @@ def test_describe_vpc_end_points():
)
vpc_endpoints = ec2.describe_vpc_endpoints()
assert (
vpc_endpoints.get("VpcEndpoints")[0].get("PrivateDnsEnabled")
is vpc_end_point.get("VpcEndpoint").get("PrivateDnsEnabled")
is True
)
assert vpc_endpoints.get("VpcEndpoints")[0].get(
"VpcEndpointId"
) == vpc_end_point.get("VpcEndpoint").get("VpcEndpointId")