feat: wire matrix runtime to real backend
This commit is contained in:
parent
9784ca6783
commit
94bdb44b93
3 changed files with 34 additions and 6 deletions
|
|
@ -11,6 +11,7 @@ from adapter.matrix.handlers.auth import handle_invite
|
|||
from adapter.matrix.store import get_room_meta, get_user_meta, set_user_meta
|
||||
from core.protocol import IncomingCallback, IncomingCommand, OutgoingMessage
|
||||
from sdk.mock import MockPlatformClient
|
||||
from sdk.real import RealPlatformClient
|
||||
|
||||
|
||||
async def test_matrix_dispatcher_registers_custom_handlers():
|
||||
|
|
@ -254,3 +255,12 @@ async def test_prepare_live_sync_returns_next_batch_from_bootstrap_sync():
|
|||
|
||||
client.sync.assert_awaited_once_with(timeout=0, full_state=True)
|
||||
assert since == "s123"
|
||||
|
||||
|
||||
async def test_build_runtime_uses_real_platform_when_matrix_backend_is_real(monkeypatch):
|
||||
monkeypatch.setenv("MATRIX_PLATFORM_BACKEND", "real")
|
||||
monkeypatch.setenv("AGENT_WS_URL", "ws://agent.example/agent_ws/")
|
||||
|
||||
runtime = build_runtime()
|
||||
|
||||
assert isinstance(runtime.platform, RealPlatformClient)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue