Skip to content

Commit

Permalink
Use specific workload messages for the Ubuntu units
Browse files Browse the repository at this point in the history
  • Loading branch information
lmlg committed Apr 24, 2024
1 parent 4296630 commit 1ecd7cc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions zaza/openstack/charm_tests/ceph/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 1ecd7cc

Please sign in to comment.