summaryrefslogtreecommitdiffstats
path: root/src/cephadm/tests/test_cephadm.py
diff options
context:
space:
mode:
authorJohn Mulligan <jmulligan@redhat.com>2023-05-20 19:45:10 +0200
committerJohn Mulligan <jmulligan@redhat.com>2023-06-15 22:35:34 +0200
commit4a9ad8a589581284c69d6dc105e9eab07d1ea6b2 (patch)
tree710d600eafa631047d3310c915476dd8a8123050 /src/cephadm/tests/test_cephadm.py
parentcephadm: combine deploy functions some more (diff)
downloadceph-4a9ad8a589581284c69d6dc105e9eab07d1ea6b2.tar.xz
ceph-4a9ad8a589581284c69d6dc105e9eab07d1ea6b2.zip
cephadm: convert test case to call command_deploy_from
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>
Diffstat (limited to 'src/cephadm/tests/test_cephadm.py')
-rw-r--r--src/cephadm/tests/test_cephadm.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cephadm/tests/test_cephadm.py b/src/cephadm/tests/test_cephadm.py
index d51210949b0..4d2e8fde30d 100644
--- a/src/cephadm/tests/test_cephadm.py
+++ b/src/cephadm/tests/test_cephadm.py
@@ -313,6 +313,8 @@ class TestCephAdm(object):
@mock.patch('cephadm.get_unit_name', lambda *args, **kwargs: 'mon-unit-name')
@mock.patch('cephadm.extract_uid_gid', lambda *args, **kwargs: (0, 0))
@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
@@ -354,7 +356,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')