mgr/selftest: adapt to now orch interface

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
This commit is contained in:
Sebastian Wagner 2021-02-09 11:58:31 +01:00
parent b92dc71205
commit 828992d7fe

View File

@ -440,12 +440,10 @@ class Module(MgrModule):
def remote_from_orchestrator_cli_self_test(self, what):
import orchestrator
if what == 'OrchestratorError':
c = orchestrator.TrivialReadCompletion(result=None)
c.fail(orchestrator.OrchestratorError('hello, world'))
c = orchestrator.OrchResult(result=None, exception=orchestrator.OrchestratorError('hello, world'))
return c
elif what == "ZeroDivisionError":
c = orchestrator.TrivialReadCompletion(result=None)
c.fail(ZeroDivisionError('hello, world'))
c = orchestrator.OrchResult(result=None, exception=ZeroDivisionError('hello, world'))
return c
assert False, repr(what)