From 5541905935a44f317847dbffdbc875258a21e24c Mon Sep 17 00:00:00 2001 From: Luciano Lo Giudice Date: Mon, 13 May 2024 06:12:15 -0300 Subject: [PATCH] Fix test for ceph-fs key rotation The ceph-fs charm sometimes creates an entity called 'mds.None'. This is probably a bug, but in the meantime, we filter it out in the key rotation test class. --- zaza/openstack/charm_tests/ceph/tests.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zaza/openstack/charm_tests/ceph/tests.py b/zaza/openstack/charm_tests/ceph/tests.py index 58719c2..f0c00a6 100644 --- a/zaza/openstack/charm_tests/ceph/tests.py +++ b/zaza/openstack/charm_tests/ceph/tests.py @@ -1829,8 +1829,11 @@ class CephMonKeyRotationTests(test_utils.BaseCharmTest): return next(iter(ret))[0] def _get_fs_client(self, unit): - ret = self._get_all_keys(unit, lambda x: (x.startswith('mds.') and - x != 'mds.ceph-fs')) + def _filter_fs(name): + return (name.startswith('mds.') and + name not in ('mds.ceph-fs', 'mds.None')) + + ret = self._get_all_keys(unit, _filter_fs) if not ret: return None return next(iter(ret))[0]