validate protocol on target group creation
This commit is contained in:
parent
35f436e24f
commit
23ad62a4f9
2 changed files with 25 additions and 0 deletions
|
|
@ -283,6 +283,21 @@ def test_create_target_group_and_listeners():
|
|||
|
||||
load_balancer_arn = response.get('LoadBalancers')[0].get('LoadBalancerArn')
|
||||
|
||||
# Can't create a target group with an invalid protocol
|
||||
with assert_raises(ClientError):
|
||||
conn.create_target_group(
|
||||
Name='a-target',
|
||||
Protocol='HTTP',
|
||||
Port=8080,
|
||||
VpcId=vpc.id,
|
||||
HealthCheckProtocol='/HTTP',
|
||||
HealthCheckPort='8080',
|
||||
HealthCheckPath='/',
|
||||
HealthCheckIntervalSeconds=5,
|
||||
HealthCheckTimeoutSeconds=5,
|
||||
HealthyThresholdCount=5,
|
||||
UnhealthyThresholdCount=2,
|
||||
Matcher={'HttpCode': '200'})
|
||||
response = conn.create_target_group(
|
||||
Name='a-target',
|
||||
Protocol='HTTP',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue