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:
Peter Sabaini
2023-03-30 15:25:19 +02:00
parent 14c8d59d0a
commit 9880637aa1
2 changed files with 23 additions and 23 deletions
@@ -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()
-23
View File
@@ -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...')