Skip to content

Commit

Permalink
Test for ELB with 0 instances attached (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajvb authored Jun 24, 2020
1 parent fb0b5a3 commit 1b254f2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions aws/elb/test_elb_instances_attached.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import pytest

from aws.elb.resources import elbs


@pytest.mark.elb
@pytest.mark.parametrize(
"elb", elbs(), ids=lambda e: e["LoadBalancerName"],
)
def test_elb_instances_attached(elb):
"""
Checks to see that an ELB has attached instances and fails if
there are 0
"""
assert len(elb["Instances"]) > 0, "ELB has zero attached instances"

0 comments on commit 1b254f2

Please sign in to comment.