Don't assert against all the lb-members
Assertion only needs to happen against the pool which
test_neutron_autoscaling.yaml creates, not against all the
lb-members that may exist.
Closes-Bug: #1446093
Change-Id: I2229a148460e68a7f9a1034edc91f2a6bc6cdf8b
diff --git a/scenario/test_neutron_autoscaling.py b/scenario/test_neutron_autoscaling.py
index 9bbfbab..9a1e634 100644
--- a/scenario/test_neutron_autoscaling.py
+++ b/scenario/test_neutron_autoscaling.py
@@ -50,8 +50,10 @@
)
# Check number of members
- members = self.network_client.list_members()
- self.assertEqual(1, len(members["members"]))
+ pool_resource = self.client.resources.get(stack_id, 'test_pool')
+ pool_members = self.network_client.list_members(
+ pool_id=pool_resource.physical_resource_id)['members']
+ self.assertEqual(1, len(pool_members))
# Increase desired capacity and update the stack
template = self._load_template(
@@ -65,5 +67,6 @@
)
# Check number of members
- upd_members = self.network_client.list_members()
- self.assertEqual(2, len(upd_members["members"]))
+ pool_members = self.network_client.list_members(
+ pool_id=pool_resource.physical_resource_id)['members']
+ self.assertEqual(2, len(pool_members))