]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: fix error_ok not being passed in unit tests
authorAdam King <adking@redhat.com>
Sun, 22 Jan 2023 16:52:10 +0000 (11:52 -0500)
committerAdam King <adking@redhat.com>
Mon, 13 Mar 2023 22:05:55 +0000 (18:05 -0400)
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit d9292afeddee11da87f7dce38edc34e9442a4368)

Conflicts:
src/pybind/mgr/cephadm/tests/test_cephadm.py

src/pybind/mgr/cephadm/tests/test_cephadm.py

index 34dddb4bfa7e5c03f613282234a4b0350d9588f2..b6f9cbab57ace6d53a9f634c42be2573699039eb 100644 (file)
@@ -116,13 +116,13 @@ def with_osd_daemon(cephadm_module: CephadmOrchestrator, _run_cephadm, host: str
         [host]).stdout == f"Created osd(s) 1 on host '{host}'"
     assert _run_cephadm.mock_calls == [
         mock.call(host, 'osd', 'ceph-volume',
-                  ['--', 'lvm', 'list', '--format', 'json'], no_fsid=False, image=''),
+                  ['--', 'lvm', 'list', '--format', 'json'], no_fsid=False, error_ok=False, image=''),
         mock.call(host, f'osd.{osd_id}', 'deploy',
                   ['--name', f'osd.{osd_id}', '--meta-json', mock.ANY,
                    '--config-json', '-', '--osd-fsid', 'uuid'],
                   stdin=mock.ANY, image=''),
         mock.call(host, 'osd', 'ceph-volume',
-                  ['--', 'raw', 'list', '--format', 'json'], no_fsid=False, image=''),
+                  ['--', 'raw', 'list', '--format', 'json'], no_fsid=False, error_ok=False, image=''),
     ]
     dd = cephadm_module.cache.get_daemon(f'osd.{osd_id}', host=host)
     assert dd.name() == f'osd.{osd_id}'
@@ -1693,10 +1693,10 @@ Traceback (most recent call last):
             assert _run_cephadm.mock_calls == [
                 mock.call('test', 'osd', 'ceph-volume',
                           ['--', 'inventory', '--format=json-pretty', '--filter-for-batch'], image='',
-                          no_fsid=False),
+                          no_fsid=False, error_ok=False),
                 mock.call('test', 'osd', 'ceph-volume',
                           ['--', 'inventory', '--format=json-pretty'], image='',
-                          no_fsid=False),
+                          no_fsid=False, error_ok=False),
             ]
 
     @mock.patch("cephadm.serve.CephadmServe._run_cephadm")