From ed3b2737d1bc8790ad354e22e2b6136243256960 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Wed, 6 Jan 2021 11:38:41 +0000 Subject: [PATCH 1/2] Use ceph-mon to check ceph version not keystone The test class BlueStoreCompressionCharmOperation gates tests on whether the ceph release is mimic or newer but it uses the keystone application to calculate the currently deployed version. This PR switches the test class to ceck the version of ceph-mon instead which makes more sense and the keystone application may not always present in a ceph deployment. --- zaza/openstack/charm_tests/ceph/tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zaza/openstack/charm_tests/ceph/tests.py b/zaza/openstack/charm_tests/ceph/tests.py index 349d514..107eb9f 100644 --- a/zaza/openstack/charm_tests/ceph/tests.py +++ b/zaza/openstack/charm_tests/ceph/tests.py @@ -881,7 +881,8 @@ class BlueStoreCompressionCharmOperation(test_utils.BaseCharmTest): def setUpClass(cls): """Perform class one time initialization.""" super(BlueStoreCompressionCharmOperation, cls).setUpClass() - cls.current_release = zaza_openstack.get_os_release() + cls.current_release = zaza_openstack.get_os_release( + application='ceph-mon') cls.bionic_rocky = zaza_openstack.get_os_release('bionic_rocky') def setUp(self): From ddd9c7402809175ac60889a021bff0da5749b8bc Mon Sep 17 00:00:00 2001 From: Liam Young Date: Wed, 6 Jan 2021 12:12:42 +0000 Subject: [PATCH 2/2] Use keystone in the first instance --- zaza/openstack/charm_tests/ceph/tests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zaza/openstack/charm_tests/ceph/tests.py b/zaza/openstack/charm_tests/ceph/tests.py index 107eb9f..c7d44bd 100644 --- a/zaza/openstack/charm_tests/ceph/tests.py +++ b/zaza/openstack/charm_tests/ceph/tests.py @@ -881,8 +881,13 @@ class BlueStoreCompressionCharmOperation(test_utils.BaseCharmTest): def setUpClass(cls): """Perform class one time initialization.""" super(BlueStoreCompressionCharmOperation, cls).setUpClass() + release_application = 'keystone' + try: + zaza_model.get_application(release_application) + except KeyError: + release_application = 'ceph-mon' cls.current_release = zaza_openstack.get_os_release( - application='ceph-mon') + application=release_application) cls.bionic_rocky = zaza_openstack.get_os_release('bionic_rocky') def setUp(self):