From 9ec95cd6baa74f751dda6baa9786ae0c9796dc20 Mon Sep 17 00:00:00 2001 From: Martin Kalcok Date: Tue, 6 May 2025 12:11:44 +0200 Subject: [PATCH] ovn: Wait for correct status in downscale test When adding/removing units during the downscale test, the test should take into consideration 'target_deploy_status'. Signed-off-by: Martin Kalcok --- zaza/openstack/charm_tests/ovn/tests.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/zaza/openstack/charm_tests/ovn/tests.py b/zaza/openstack/charm_tests/ovn/tests.py index dafeed1..cf869e9 100644 --- a/zaza/openstack/charm_tests/ovn/tests.py +++ b/zaza/openstack/charm_tests/ovn/tests.py @@ -866,8 +866,7 @@ class OVNCentralDownscaleTests(test_utils.BaseCharmTest): return sb_status, nb_status - @staticmethod - def _add_unit(number_of_units=1): + def _add_unit(self, number_of_units=1): """Add specified number of units to ovn-central application. This function also waits until the application reaches active state. @@ -877,10 +876,11 @@ class OVNCentralDownscaleTests(test_utils.BaseCharmTest): count=number_of_units, wait_appear=True ) - zaza.model.wait_for_application_states() + zaza.model.wait_for_application_states( + states=self.test_config.get('target_deploy_status', {}), + ) - @staticmethod - def _remove_unit(unit_name): + def _remove_unit(self, unit_name): """Remove specified unit from ovn-central application. This function also waits until the application reaches active state @@ -888,7 +888,9 @@ class OVNCentralDownscaleTests(test_utils.BaseCharmTest): """ zaza.model.destroy_unit("ovn-central", unit_name) zaza.model.block_until_all_units_idle() - zaza.model.wait_for_application_states() + zaza.model.wait_for_application_states( + states=self.test_config.get('target_deploy_status', {}), + ) def _assert_servers_cleanly_removed(self, sb_id, nb_id): """Assert that specified members were removed from cluster.