@@ -394,19 +394,20 @@ def test_daemon_action(self, cephadm_module: CephadmOrchestrator):
394394 assert wait (cephadm_module ,
395395 c ) == f"Scheduled to redeploy rgw.{ daemon_id } on host 'test'"
396396
397- for what in ('start' , 'stop' ):
398- c = cephadm_module .daemon_action (what , d_name )
399- assert wait (cephadm_module ,
400- c ) == F"Scheduled to { what } { d_name } on host 'test'"
397+ c = cephadm_module .daemon_action ('start' , d_name )
398+ assert wait (cephadm_module ,
399+ c ) == F"Scheduled to start { d_name } on host 'test'"
401400
402401 for what in ('start' , 'stop' , 'restart' ):
403402 c = cephadm_module .daemon_action (what , d_name , force = True )
404403 assert wait (cephadm_module ,
405404 c ) == F"Scheduled to { what } { d_name } on host 'test'"
406405
407- with pytest .raises (OrchestratorError , match = f"Unable to restart daemon { d_name } " ):
408- c = cephadm_module .daemon_action ('restart' , d_name )
409- wait (cephadm_module , c )
406+ for what in ('stop' , 'restart' ):
407+ with pytest .raises (OrchestratorError , match = f"Unable to { what } daemon { d_name } " ):
408+ c = cephadm_module .daemon_action (what , d_name )
409+ wait (cephadm_module , c )
410+
410411 # Make sure, _check_daemons does a redeploy due to monmap change:
411412 cephadm_module ._store ['_ceph_get/mon_map' ] = {
412413 'modified' : datetime_to_str (datetime_now ()),
0 commit comments