]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm/tests: update daemon_action tests with force flag 61925/head
authorJoshua Blanch <joshua.blanch@clyso.com>
Wed, 19 Feb 2025 23:18:50 +0000 (23:18 +0000)
committerJoshua Blanch <joshua.blanch@clyso.com>
Thu, 20 Feb 2025 00:50:43 +0000 (00:50 +0000)
Signed-off-by: Joshua Blanch <joshua.blanch@clyso.com>
src/pybind/mgr/cephadm/tests/test_cephadm.py

index 22bd26def91ce369b4d4bcb1d4e973866a2392d5..48e58d9fc78433b56ab06f0d24465fb1f66e7b1c 100644 (file)
@@ -394,11 +394,19 @@ class TestCephadm(object):
                 assert wait(cephadm_module,
                             c) == f"Scheduled to redeploy rgw.{daemon_id} on host 'test'"
 
-                for what in ('start', 'stop', 'restart'):
+                for what in ('start', 'stop'):
                     c = cephadm_module.daemon_action(what, d_name)
                     assert wait(cephadm_module,
                                 c) == F"Scheduled to {what} {d_name} on host 'test'"
 
+                for what in ('start', 'stop', 'restart'):
+                    c = cephadm_module.daemon_action(what, d_name, force=True)
+                    assert wait(cephadm_module,
+                                c) == F"Scheduled to {what} {d_name} on host 'test'"
+
+                with pytest.raises(OrchestratorError, match=f"Unable to restart daemon {d_name}"):
+                    c = cephadm_module.daemon_action('restart', d_name)
+                    wait(cephadm_module, c)
                 # Make sure, _check_daemons does a redeploy due to monmap change:
                 cephadm_module._store['_ceph_get/mon_map'] = {
                     'modified': datetime_to_str(datetime_now()),