From b99a6c428a078e133678abd8b464925e77abb9d1 Mon Sep 17 00:00:00 2001 From: Luciano Lo Giudice Date: Tue, 9 Apr 2024 13:47:25 -0300 Subject: [PATCH] Fix access to keys --- zaza/openstack/charm_tests/ceph/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zaza/openstack/charm_tests/ceph/tests.py b/zaza/openstack/charm_tests/ceph/tests.py index 049be07..4e51d3c 100644 --- a/zaza/openstack/charm_tests/ceph/tests.py +++ b/zaza/openstack/charm_tests/ceph/tests.py @@ -1766,7 +1766,7 @@ class CephMonKeyRotationTests(test_utils.BaseCharmTest): # key: # key contents # That's why we need to move one position ahead. - if 'key:' in line and entity_filter(line[ix - 1]): + if 'key:' in line and entity_filter(data[ix - 1]): ret.add(data[ix + 1]) return ret @@ -1784,7 +1784,7 @@ class CephMonKeyRotationTests(test_utils.BaseCharmTest): zaza_model.wait_for_application_states() new_keys = self._get_all_keys(unit, entity_filter) self.assertNotEqual(old_keys, new_keys) - self.assertEqual(new_keys - old_keys, 1) + self.assertEqual(len(new_keys - old_keys), 1) def _get_rgw_client(self, unit): cmd = 'sudo ceph auth ls | grep client.rgw'