From 1ecd7cc9c6ebcf8f425de767c33c145efd23046c Mon Sep 17 00:00:00 2001 From: Luciano Lo Giudice Date: Wed, 24 Apr 2024 14:04:29 -0300 Subject: [PATCH] Use specific workload messages for the Ubuntu units --- zaza/openstack/charm_tests/ceph/tests.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/zaza/openstack/charm_tests/ceph/tests.py b/zaza/openstack/charm_tests/ceph/tests.py index 86fcf33c9..1bca97355 100644 --- a/zaza/openstack/charm_tests/ceph/tests.py +++ b/zaza/openstack/charm_tests/ceph/tests.py @@ -1770,7 +1770,7 @@ def _get_all_keys(self, unit, entity_filter): ret.add((data[ix - 1], data[ix + 1])) return ret - def _check_key_rotation(self, entity, unit): + def _check_key_rotation(self, entity, unit, states=None): def entity_filter(name): return name.startswith(entity) @@ -1781,7 +1781,7 @@ def entity_filter(name): action_params={'entity': entity} ) zaza_utils.assertActionRanOK(action_obj) - zaza_model.wait_for_application_states() + zaza_model.wait_for_application_states(states=states) new_keys = self._get_all_keys(unit, entity_filter) self.assertNotEqual(old_keys, new_keys) diff = new_keys - old_keys @@ -1817,7 +1817,14 @@ def test_key_rotate(self): zaza_model.get_application('ceph-fs') fs_svc = self._get_all_keys(unit, lambda x: x.startswith('mds.')) if fs_svc is not None: - self._check_key_rotation(next(iter(fs_svc))[0], unit) + ubuntu_states = { + 'ubuntu': { + 'workload-status': 'active', + 'workload-status-message': '' + } + } + self._check_key_rotation(next(iter(fs_svc))[0], unit, + ubuntu_states) else: logging.info('ceph-fs units present, but no MDS service') except KeyError: