Fix missing valid_attrs (issue 4529) (#4530)
This commit is contained in:
parent
e379ac1cec
commit
1e85e16f0f
@ -425,6 +425,8 @@ class FakeLoadBalancer(CloudFormationModel):
|
|||||||
"access_logs.s3.prefix",
|
"access_logs.s3.prefix",
|
||||||
"deletion_protection.enabled",
|
"deletion_protection.enabled",
|
||||||
"idle_timeout.timeout_seconds",
|
"idle_timeout.timeout_seconds",
|
||||||
|
"routing.http2.enabled",
|
||||||
|
"routing.http.drop_invalid_header_fields.enabled",
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
@ -1146,6 +1146,50 @@ def test_modify_load_balancer_attributes_idle_timeout():
|
|||||||
idle_timeout["Value"].should.equal("600")
|
idle_timeout["Value"].should.equal("600")
|
||||||
|
|
||||||
|
|
||||||
|
@mock_elbv2
|
||||||
|
@mock_ec2
|
||||||
|
def test_modify_load_balancer_attributes_routing_http2_enabled():
|
||||||
|
response, _, _, _, _, client = create_load_balancer()
|
||||||
|
arn = response["LoadBalancers"][0]["LoadBalancerArn"]
|
||||||
|
|
||||||
|
client.modify_load_balancer_attributes(
|
||||||
|
LoadBalancerArn=arn,
|
||||||
|
Attributes=[{"Key": "routing.http2.enabled", "Value": "false"}],
|
||||||
|
)
|
||||||
|
|
||||||
|
response = client.describe_load_balancer_attributes(LoadBalancerArn=arn)
|
||||||
|
routing_http2_enabled = list(
|
||||||
|
filter(
|
||||||
|
lambda item: item["Key"] == "routing.http2.enabled", response["Attributes"],
|
||||||
|
)
|
||||||
|
)[0]
|
||||||
|
routing_http2_enabled["Value"].should.equal("false")
|
||||||
|
|
||||||
|
|
||||||
|
@mock_elbv2
|
||||||
|
@mock_ec2
|
||||||
|
def test_modify_load_balancer_attributes_routing_http_drop_invalid_header_fields_enabled():
|
||||||
|
response, _, _, _, _, client = create_load_balancer()
|
||||||
|
arn = response["LoadBalancers"][0]["LoadBalancerArn"]
|
||||||
|
|
||||||
|
client.modify_load_balancer_attributes(
|
||||||
|
LoadBalancerArn=arn,
|
||||||
|
Attributes=[
|
||||||
|
{"Key": "routing.http.drop_invalid_header_fields.enabled", "Value": "false"}
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
response = client.describe_load_balancer_attributes(LoadBalancerArn=arn)
|
||||||
|
routing_http_drop_invalid_header_fields_enabled = list(
|
||||||
|
filter(
|
||||||
|
lambda item: item["Key"]
|
||||||
|
== "routing.http.drop_invalid_header_fields.enabled",
|
||||||
|
response["Attributes"],
|
||||||
|
)
|
||||||
|
)[0]
|
||||||
|
routing_http_drop_invalid_header_fields_enabled["Value"].should.equal("false")
|
||||||
|
|
||||||
|
|
||||||
@mock_elbv2
|
@mock_elbv2
|
||||||
@mock_ec2
|
@mock_ec2
|
||||||
@mock_acm
|
@mock_acm
|
||||||
|
Loading…
Reference in New Issue
Block a user