Use already existing functionality to fetch RGW client

This commit is contained in:
Luciano Lo Giudice
2024-04-10 13:08:41 -03:00
parent 8fe9a110ed
commit f411c0b0b1
+4 -3
View File
@@ -1793,9 +1793,10 @@ class CephMonKeyRotationTests(test_utils.BaseCharmTest):
self.assertTrue(entity_filter(first[0]))
def _get_rgw_client(self, unit):
cmd = 'sudo ceph auth ls | grep client.rgw'
result = zaza_model.run_on_unit(unit, cmd)
return result['Stdout'].strip()
ret = self._get_all_keys(unit, 'client.rgw')
if not ret:
return None
return next(iter(ret))[0]
def test_key_rotate(self):
"""Test that rotating the keys actually changes them."""