]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: fixups for unit tests
authorAdam King <adking@redhat.com>
Wed, 23 Aug 2023 21:24:13 +0000 (17:24 -0400)
committerAdam King <adking@redhat.com>
Thu, 31 Aug 2023 17:36:15 +0000 (13:36 -0400)
These fixes really should be part of the commits
that brought in/changed the tests, but it's
difficult to find the exact commits as part of
this batch backport so I'm doing these minor fixups
in their own commit

Signed-off-by: Adam King <adking@redhat.com>
src/cephadm/tests/test_cephadm.py
src/cephadm/tests/test_util_funcs.py

index f7d5fab3044eaaea2c879543df7abcfd5b159f02..1267da985099aaa8dce63c735c48560a184c10d4 100644 (file)
@@ -362,6 +362,7 @@ class TestCephAdm(object):
     @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)
+    @mock.patch('cephadm.extract_uid_gid', lambda *args, **kwargs: ('ceph', 'ceph'))
     def test_mon_crush_location(self, _get_deployment_container, _migrate_sysctl, _make_var_run, _fetch_configs, _deploy_daemon, _file_lock, _logger):
         """
         test that crush location for mon is set if it is included in config_json
index d7b173090b6f03e1af5755cdf18d1009691568de..270753a554b86e0a2cf65bcb442a95aaebb39974 100644 (file)
@@ -781,7 +781,7 @@ class CompareContext2:
     def check(self, ctx):
         assert ctx.name == 'cc2'
         assert ctx.fsid == 'foobar'
-        assert ctx.image == 'quay.ceph.io/ceph-ci/ceph:main'
+        assert ctx.image == 'quay.io/ceph/ceph:v18'
         assert ctx.meta_properties == {"fruit": "banana", "vegetable": "carrot"}
         assert ctx.config_blobs == {
             "alpha": {"sloop": "John B"},