Bootstrap tamq local tmux agent message queue
Some checks failed
tamq-ci / test (push) Failing after 36s
Some checks failed
tamq-ci / test (push) Failing after 36s
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a02f34-ead4-7a60-85cd-d7f08e22fa0e
This commit is contained in:
parent
521bbe5afc
commit
4d915a2617
58 changed files with 1882 additions and 1 deletions
20
tests/test_config_defaults.py
Normal file
20
tests/test_config_defaults.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
from tamq.config import setting
|
||||
|
||||
|
||||
def test_toml_defaults(monkeypatch, tmp_path):
|
||||
config = tmp_path / "config.toml"
|
||||
config.write_text("[tamq]\npurge_before='30d'\nhistory_max_size='12MB'\n")
|
||||
monkeypatch.setenv("TAMQ_CONFIG", str(config))
|
||||
assert setting("purge_before", "365d") == "30d"
|
||||
assert setting("history_max_size", "100MB") == "12MB"
|
||||
assert setting("missing", "fallback") == "fallback"
|
||||
|
||||
|
||||
def test_delivery_interval_is_configurable(monkeypatch, tmp_path):
|
||||
config = tmp_path / "config.toml"
|
||||
config.write_text("[tamq]\ndelivery_poll_interval='2.5'\n")
|
||||
monkeypatch.setenv("TAMQ_CONFIG", str(config))
|
||||
from tamq.service import Service
|
||||
from tamq.store import Store
|
||||
service = Service(store=Store(tmp_path / "state.sqlite3"))
|
||||
assert service.poll_interval == 2.5
|
||||
Loading…
Add table
Add a link
Reference in a new issue