test(cron): preserve rejected creation exit status
This commit is contained in:
@@ -46,3 +46,10 @@ def test_invalid_creation_is_rejected_without_writes(tmp_path):
|
||||
"action": "create", "schedule": "every 1h", "prompt": "invalid", **flags}))
|
||||
assert result["success"] is False, (flags, result)
|
||||
assert jobs.load_jobs() == []
|
||||
from types import SimpleNamespace
|
||||
from hermes_cli.main import cmd_cron
|
||||
|
||||
args = SimpleNamespace(cron_command="create", schedule="every 1h", prompt="invalid",
|
||||
paused=False, paused_reason="orphan")
|
||||
assert cmd_cron(args) == 1
|
||||
assert jobs.load_jobs() == []
|
||||
|
||||
Reference in New Issue
Block a user