diff --git a/zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py b/zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py index 132d97602..bb9918fe0 100644 --- a/zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py +++ b/zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py @@ -156,14 +156,15 @@ def create_volume(cinder, volume_params, retry=20): def setup_rbd_mirror(): - """Setup an RBD pool in case Cinder isn't present.""" + """Set up an RBD pool in case Cinder isn't present.""" zaza.model.run_action_on_leader( 'ceph-mon', 'create-pool', action_params={ 'name': 'zaza-boot', 'app-name': 'rbd', - }) + } + ) zaza.model.run_action_on_leader( 'ceph-rbd-mirror', 'refresh-pools', @@ -191,6 +192,7 @@ def setUpClass(cls): cls.with_cinder = False def check_cinder_present(self, caller): + """Skip a test if Cinder isn't present.""" if not self.with_cinder: raise unittest.SkipTest('Skipping %s due to lack of Cinder' % caller) @@ -244,7 +246,8 @@ def get_failover_pools(self): """ site_a_pools, site_b_pools = self.get_pools() if (self.with_cinder and - get_cinder_rbd_mirroring_mode(self.cinder_ceph_app_name) == 'image'): + get_cinder_rbd_mirroring_mode(self.cinder_ceph_app_name) == + 'image'): site_a_pools.remove(self.cinder_ceph_app_name) site_b_pools.remove(self.cinder_ceph_app_name) @@ -798,8 +801,8 @@ def test_100_forced_juju_failover(self): }) self.assertEqual(int(result.results['Code']), 0) - # The action may not show up as 'failed' if there are no pools that needed - # to be promoted. + # The action may not show up as 'failed' if there are no pools that + # needed to be promoted. # self.assertEqual(result.status, 'failed') # Retry to promote site-b using the 'force' Juju action parameter.