Skip to content

Commit 4aa836d

Browse files
committed
improve coverage
1 parent c295e65 commit 4aa836d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

services/autoscaling/tests/unit/test_utils_cluster_scaling.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,24 @@ async def test_associate_ec2_instances_with_nodes_with_no_correspondence(
7575
assert len(non_associated_instances) == len(ec2_instances)
7676

7777

78+
async def test_associate_ec2_instances_with_nodes_with_invalid_dns(
79+
fake_ec2_instance_data: Callable[..., EC2InstanceData],
80+
node: Callable[..., DockerNode],
81+
):
82+
nodes = [node() for _ in range(10)]
83+
ec2_instances = [
84+
fake_ec2_instance_data(aws_private_dns="invalid-dns-name") for _ in range(10)
85+
]
86+
87+
(
88+
associated_instances,
89+
non_associated_instances,
90+
) = associate_ec2_instances_with_nodes(nodes, ec2_instances)
91+
92+
assert not associated_instances
93+
assert non_associated_instances
94+
95+
7896
async def test_associate_ec2_instances_with_corresponding_nodes(
7997
fake_ec2_instance_data: Callable[..., EC2InstanceData],
8098
node: Callable[..., DockerNode],

0 commit comments

Comments
 (0)