a682e2eebf7c draft — Arnaud Campeas[arnaud.campeas@pythonian.fr] tip 10 days ago
schedule/step: correct bug when the user is give to .prepare

The test is not satisfying: it seems there is no simple way to test if
the step method is failing or not. Its return could be enriched with
such informations
2 files changed, 2 insertions(+), 2 deletions(-)

M rework/monitor.py
M tests/test_schedule.py
M rework/monitor.py +1 -1
@@ 196,7 196,7 @@ class scheduler:
             self.logger.info(f'sched: starting with {len(defs)} definitions')
             for idx, (operation, rule, inputdata, hostid, meta) in enumerate(defs):
                 self.logger.info(f'{idx} {operation} {rule} {hostid} {meta}')
-                self.schedule(rule, operation, self.domain, inputdata, hostid, meta)
+                self.schedule(rule, operation, self.domain, inputdata, hostid, None, None, meta)
             self.defs = defs

M tests/test_schedule.py +1 -1
@@ 19,4 19,4 @@ def test_web_scheduling(engine, cleanup,
             "\n[parameters: {\'name\': \'basic\', \'modname\': {\'user\': \'WEBUI\'}}]"
-        assert error in printed[-1]
+        assert error not in printed[-1]