While tests were still passing, since this server class
was added the units tests are taking significantly longer to
run and I'm seeing messages like
Failed to run cephadm http server: Expected 4 octets in "<MagicMock name='mock.get().__getitem__()' id='
139931011514704'>"
The run time given by "time tox -e py3" without this commit on
my local machine was
real 2m45.749s
user 16m13.273s
sys 0m11.041s
and with this commit (and the server run function therefore mocked)
real 0m36.164s
user 0m26.932s
sys 0m2.367s
so it seems to run about 4x faster with the server run function
mocked and the tests pass in both cases
Issue introduced by: https://github.com/ceph/ceph/pull/46400/commits/
a0fe3ffdaaddd661f115de78ddae89b07b98a9ae
Signed-off-by: Adam King <adking@redhat.com>
mock.patch("cephadm.agent.CephadmAgentHelpers._apply_agent", return_value=False), \
mock.patch("cephadm.agent.CephadmAgentHelpers._agent_down", return_value=False), \
mock.patch('cephadm.offline_watcher.OfflineHostWatcher.run'), \
- mock.patch('cephadm.tuned_profiles.TunedProfileUtils._remove_stray_tuned_profiles'),\
- mock.patch('cephadm.offline_watcher.OfflineHostWatcher.run'):
+ mock.patch('cephadm.tuned_profiles.TunedProfileUtils._remove_stray_tuned_profiles'), \
+ mock.patch('cephadm.offline_watcher.OfflineHostWatcher.run'), \
+ mock.patch('cephadm.http_server.CephadmHttpServer.run'):
m = CephadmOrchestrator.__new__(CephadmOrchestrator)
if module_options is not None: