feat: transition elbv2 state to active on first describe (#3937)

* refactor: parameterize state in elbv2 template response

* feat: transition load balancer to active on first describe

Closes #3936
This commit is contained in:
Giovanni Torres 2021-05-18 02:52:39 -04:00 committed by GitHub
commit 867cf078de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 2 deletions

View file

@ -52,6 +52,7 @@ def test_create_load_balancer():
]
)
lb.get("CreatedTime").tzinfo.should_not.be.none
lb.get("State").get("Code").should.equal("provisioning")
# Ensure the tags persisted
response = conn.describe_tags(ResourceArns=[lb.get("LoadBalancerArn")])
@ -89,6 +90,7 @@ def test_describe_load_balancers():
response.get("LoadBalancers").should.have.length_of(1)
lb = response.get("LoadBalancers")[0]
lb.get("LoadBalancerName").should.equal("my-lb")
lb.get("State").get("Code").should.equal("active")
response = conn.describe_load_balancers(
LoadBalancerArns=[lb.get("LoadBalancerArn")]