diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 16:12:40 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 16:12:40 +0900 |
| commit | c3560fdd637c4f034cac4f7371aeed65d018bc91 (patch) | |
| tree | c50d3318c0c37ca634012b7113a80c0d6e356844 /services/order-executor/tests | |
| parent | ec792a3d379c911165038d8da5b339df6ca3fccd (diff) | |
feat(services): integrate structlog, healthcheck, metrics, and Telegram
Replace logging.basicConfig/getLogger with structlog setup_logging in all
four service entry points. Add HealthCheckServer, ServiceMetrics, and
TelegramNotifier initialization to each service. Update OrderExecutor to
accept a notifier parameter and send order notifications. Add
RedisBroker.ping() for health checks. Update executor tests with
notifier=AsyncMock().
Diffstat (limited to 'services/order-executor/tests')
| -rw-r--r-- | services/order-executor/tests/test_executor.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/order-executor/tests/test_executor.py b/services/order-executor/tests/test_executor.py index 5b18992..4836ffb 100644 --- a/services/order-executor/tests/test_executor.py +++ b/services/order-executor/tests/test_executor.py @@ -58,6 +58,7 @@ async def test_executor_places_order_when_risk_passes(): risk_manager=risk_manager, broker=broker, db=db, + notifier=AsyncMock(), dry_run=False, ) @@ -84,6 +85,7 @@ async def test_executor_rejects_when_risk_fails(): risk_manager=risk_manager, broker=broker, db=db, + notifier=AsyncMock(), dry_run=False, ) @@ -109,6 +111,7 @@ async def test_executor_dry_run_does_not_call_exchange(): risk_manager=risk_manager, broker=broker, db=db, + notifier=AsyncMock(), dry_run=True, ) |
