Move pristine test to ceph-osd tests
Pristine status test was applied to all ceph related charms, but only really is relevant for the ceph-osd charm.
This commit is contained in:
@@ -282,3 +282,26 @@ class ServiceTest(unittest.TestCase):
|
||||
wait_for_service(unit_name=self.TESTED_UNIT,
|
||||
services=should_stop,
|
||||
target_status='stopped')
|
||||
|
||||
def test_active_after_pristine_block(self):
|
||||
"""Test if we can get back to active state after pristine block.
|
||||
|
||||
Set a non-pristine status, then trigger update-status to see if it
|
||||
clears.
|
||||
"""
|
||||
logging.info('Setting Non-pristine status')
|
||||
zaza_model.run_on_leader(
|
||||
"ceph-osd",
|
||||
"status-set blocked 'Non-pristine'"
|
||||
)
|
||||
ceph_osd_states = {
|
||||
'ceph-osd': {
|
||||
'workload-status': 'blocked',
|
||||
'workload-status-message-prefix': 'Non-pristine'
|
||||
}
|
||||
}
|
||||
zaza_model.wait_for_application_states(states=ceph_osd_states)
|
||||
logging.info('Running update-status action')
|
||||
zaza_model.run_on_leader('ceph-osd', 'hooks/update-status')
|
||||
logging.info('Wait for idle/ready status')
|
||||
zaza_model.wait_for_application_states()
|
||||
|
||||
@@ -413,29 +413,6 @@ class CephTest(test_utils.BaseCharmTest):
|
||||
|
||||
zaza_model.wait_for_application_states()
|
||||
|
||||
def test_active_after_pristine_block(self):
|
||||
"""Test if we can get back to active state after pristine block.
|
||||
|
||||
Set a non-pristine status, then trigger update-status to see if it
|
||||
clears.
|
||||
"""
|
||||
logging.info('Setting Non-pristine status')
|
||||
zaza_model.run_on_leader(
|
||||
"ceph-osd",
|
||||
"status-set blocked 'Non-pristine'"
|
||||
)
|
||||
ceph_osd_states = {
|
||||
'ceph-osd': {
|
||||
'workload-status': 'blocked',
|
||||
'workload-status-message-prefix': 'Non-pristine'
|
||||
}
|
||||
}
|
||||
zaza_model.wait_for_application_states(states=ceph_osd_states)
|
||||
logging.info('Running update-status action')
|
||||
zaza_model.run_on_leader('ceph-osd', 'hooks/update-status')
|
||||
logging.info('Wait for idle/ready status')
|
||||
zaza_model.wait_for_application_states()
|
||||
|
||||
def test_pause_and_resume(self):
|
||||
"""The services can be paused and resumed."""
|
||||
logging.info('Checking pause and resume actions...')
|
||||
|
||||
Reference in New Issue
Block a user