From ddb6d4d4324fb10048cd9ed11a45884e060009a5 Mon Sep 17 00:00:00 2001 From: Martin Kalcok Date: Tue, 6 May 2025 09:24:13 +0200 Subject: [PATCH 1/2] ovn: ovn-central COS Integration tests Signed-off-by: Martin Kalcok --- zaza/openstack/charm_tests/ovn/tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zaza/openstack/charm_tests/ovn/tests.py b/zaza/openstack/charm_tests/ovn/tests.py index c6a7721..dafeed1 100644 --- a/zaza/openstack/charm_tests/ovn/tests.py +++ b/zaza/openstack/charm_tests/ovn/tests.py @@ -128,6 +128,14 @@ class DedicatedChassisCosIntegrationTest(ChassisCosIntegrationTest): APPLICATION_NAME = 'ovn-dedicated-chassis' +class CentralCosIntegrationTest(BaseCosIntegrationTest): + """Variant of COS integration tests for OVN Central.""" + + APPLICATION_NAME = 'ovn-central' + DASHBOARD = 'Juju: OVN Central (OVSDB)' + PROM_QUERY = 'ovn_up' + + class BaseCharmOperationTest(test_utils.BaseCharmTest): """Base OVN Charm operation tests.""" From 9ec95cd6baa74f751dda6baa9786ae0c9796dc20 Mon Sep 17 00:00:00 2001 From: Martin Kalcok Date: Tue, 6 May 2025 12:11:44 +0200 Subject: [PATCH 2/2] 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.