1515 pass
1616
1717from ceph .deployment .service_spec import ServiceSpec , PlacementSpec , RGWSpec , \
18- NFSServiceSpec , IscsiServiceSpec , HostPlacementSpec , CustomContainerSpec
18+ NFSServiceSpec , IscsiServiceSpec , HostPlacementSpec , CustomContainerSpec , MDSSpec
1919from ceph .deployment .drive_selection .selector import DriveSelection
2020from ceph .deployment .inventory import Devices , Device
2121from ceph .utils import datetime_to_str , datetime_now
@@ -165,8 +165,8 @@ def test_service_ls(self, cephadm_module):
165165 with with_host (cephadm_module , 'test' ):
166166 c = cephadm_module .list_daemons (refresh = True )
167167 assert wait (cephadm_module , c ) == []
168- with with_service (cephadm_module , ServiceSpec ('mds' , 'name' , unmanaged = True )) as _ , \
169- with_daemon (cephadm_module , ServiceSpec ('mds' , 'name' ), 'test' ) as _ :
168+ with with_service (cephadm_module , MDSSpec ('mds' , 'name' , unmanaged = True )) as _ , \
169+ with_daemon (cephadm_module , MDSSpec ('mds' , 'name' ), 'test' ) as _ :
170170
171171 c = cephadm_module .list_daemons ()
172172
@@ -227,7 +227,7 @@ def test_service_ls_service_type_flag(self, cephadm_module):
227227 with with_host (cephadm_module , 'host2' ):
228228 with with_service (cephadm_module , ServiceSpec ('mgr' , placement = PlacementSpec (count = 2 )),
229229 CephadmOrchestrator .apply_mgr , '' , status_running = True ):
230- with with_service (cephadm_module , ServiceSpec ('mds' , 'test-id' , placement = PlacementSpec (count = 2 )),
230+ with with_service (cephadm_module , MDSSpec ('mds' , 'test-id' , placement = PlacementSpec (count = 2 )),
231231 CephadmOrchestrator .apply_mds , '' , status_running = True ):
232232
233233 # with no service-type. Should provide info fot both services
@@ -1291,7 +1291,7 @@ def test_apply_save(self, spec: ServiceSpec, meth, cephadm_module: CephadmOrches
12911291
12921292 @mock .patch ("cephadm.serve.CephadmServe._run_cephadm" , _run_cephadm ('{}' ))
12931293 def test_mds_config_purge (self , cephadm_module : CephadmOrchestrator ):
1294- spec = ServiceSpec ('mds' , service_id = 'fsname' )
1294+ spec = MDSSpec ('mds' , service_id = 'fsname' , config = { 'test' : 'foo' } )
12951295 with with_host (cephadm_module , 'test' ):
12961296 with with_service (cephadm_module , spec , host = 'test' ):
12971297 ret , out , err = cephadm_module .check_mon_command ({
@@ -1310,10 +1310,11 @@ def test_mds_config_purge(self, cephadm_module: CephadmOrchestrator):
13101310 @mock .patch ("cephadm.serve.CephadmServe._run_cephadm" , _run_cephadm ('{}' ))
13111311 @mock .patch ("cephadm.services.cephadmservice.CephadmService.ok_to_stop" )
13121312 def test_daemon_ok_to_stop (self , ok_to_stop , cephadm_module : CephadmOrchestrator ):
1313- spec = ServiceSpec (
1313+ spec = MDSSpec (
13141314 'mds' ,
13151315 service_id = 'fsname' ,
1316- placement = PlacementSpec (hosts = ['host1' , 'host2' ])
1316+ placement = PlacementSpec (hosts = ['host1' , 'host2' ]),
1317+ config = {'test' : 'foo' }
13171318 )
13181319 with with_host (cephadm_module , 'host1' ), with_host (cephadm_module , 'host2' ):
13191320 c = cephadm_module .apply_mds (spec )
0 commit comments