]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: convert test case to call command_deploy_from
authorJohn Mulligan <jmulligan@redhat.com>
Sat, 20 May 2023 17:45:10 +0000 (13:45 -0400)
committerAdam King <adking@redhat.com>
Thu, 31 Aug 2023 17:35:15 +0000 (13:35 -0400)
The test was previously using command_deploy but that is being
deprecated so call command_deploy_from instead.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/tests/test_cephadm.py

index a66bac9630a9627a958b81dec779c86fcc5063a8..ae1c18249be4fc0fd62c3898ca6272e335a8bd52 100644 (file)
@@ -312,6 +312,8 @@ class TestCephAdm(object):
     @mock.patch('cephadm.check_unit', lambda *args, **kwargs: (None, 'running', None))
     @mock.patch('cephadm.get_unit_name', lambda *args, **kwargs: 'mon-unit-name')
     @mock.patch('cephadm.get_deployment_container')
+    @mock.patch('cephadm.read_configuration_source', lambda c: {})
+    @mock.patch('cephadm.apply_deploy_config_to_ctx', lambda d, c: None)
     def test_mon_crush_location(self, _get_deployment_container, _migrate_sysctl, _make_var_run, _get_parm, _deploy_daemon, _file_lock, _logger):
         """
         test that crush location for mon is set if it is included in config_json
@@ -353,7 +355,7 @@ class TestCephAdm(object):
         _deploy_daemon.side_effect = _crush_location_checker
 
         with pytest.raises(Exception, match='--set-crush-location database=a'):
-            _cephadm.command_deploy(ctx)
+            _cephadm.command_deploy_from(ctx)
 
     @mock.patch('cephadm.logger')
     @mock.patch('cephadm.fetch_custom_config_files')