feat: add experimental pushy delivery mode
Some checks failed
tamq-ci / test (push) Has been cancelled
Some checks failed
tamq-ci / test (push) Has been cancelled
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a03397-4d51-7fd1-8ff2-946eb22ea2bc
This commit is contained in:
parent
8186550c9a
commit
9ed8b62b45
16 changed files with 441 additions and 31 deletions
|
|
@ -1,4 +1,9 @@
|
|||
from tamq.cli import ensure_manual_service, ensure_output_service, parse_size
|
||||
from tamq.cli import (
|
||||
ensure_manual_service,
|
||||
ensure_output_service,
|
||||
ensure_pushy_service,
|
||||
parse_size,
|
||||
)
|
||||
|
||||
|
||||
def test_parse_size():
|
||||
|
|
@ -42,3 +47,23 @@ def test_output_service_requires_terminal_output_capability(monkeypatch):
|
|||
assert ensure_output_service() is True
|
||||
assert len(starts) == 2
|
||||
assert stops == [True]
|
||||
|
||||
|
||||
def test_pushy_service_requires_pushy_input_capability(monkeypatch):
|
||||
capabilities = iter([
|
||||
["manual_delivery", "terminal_output"],
|
||||
["manual_delivery", "terminal_output", "pushy_input"],
|
||||
])
|
||||
starts = []
|
||||
stops = []
|
||||
|
||||
async def request(payload):
|
||||
return {"capabilities": next(capabilities)}
|
||||
|
||||
monkeypatch.setattr("tamq.cli.ensure_service", lambda: starts.append(True) or True)
|
||||
monkeypatch.setattr("tamq.cli.stop_service_process", lambda: stops.append(True) or 42)
|
||||
monkeypatch.setattr("tamq.cli.request", request)
|
||||
|
||||
assert ensure_pushy_service() is True
|
||||
assert len(starts) == 2
|
||||
assert stops == [True]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue