coordination-engine/tests/test_live.py

24 lines
676 B
Python
Raw Normal View History

"""Opt-in read-only smoke; never injects a message or starts a worker."""
import os
import pytest
from coordination_engine.adapters import Hub, Tamq, registry
from coordination_engine.config import Config
@pytest.mark.live
@pytest.mark.skipif(
os.environ.get("COORDINATION_LIVE_SMOKE") != "1",
reason="set COORDINATION_LIVE_SMOKE=1 explicitly",
)
def test_local_adapter_discovery():
config = Config.load()
assert "coordination-engine" in registry()
assert isinstance(Hub(config).request("/repos/"), list)
hello = Tamq(config).request("ping")
assert {"bounded_delivery_ack_v1", "idempotent_send_v1"} <= set(
hello["capabilities"]
)