Live Smoke Testing (mcporter) -- cortex
July 30, 2026 ยท View on GitHub
End-to-end verification against a running cortex server. Complements unit tests in TESTS.md.
Purpose
scripts/smoke-test.sh exercises the full MCP server stack: auth, tool dispatch, and response validation against a live cortex instance.
Location
scripts/smoke-test.sh # Full smoke test
tests/test_live.sh # Extended live integration tests
tests/mcporter/test-tools.sh # mcporter-based tool tests
Running
# Ensure server is running
just up
# Run smoke tests
just test-live
# or: bash scripts/smoke-test.sh
mcporter configuration
mcporter config is at config/mcporter.json:
{
"mcpServers": {
"cortex": {
"transport": "http",
"url": "http://localhost:3100/mcp"
}
}
}
Manual mcporter commands
# List available tools
mcporter list cortex --config config/mcporter.json
# Call actions through the single cortex tool
mcporter call --config config/mcporter.json cortex.cortex action=stats
mcporter call --config config/mcporter.json cortex.cortex action=tail n=10
mcporter call --config config/mcporter.json cortex.cortex action=search query=error limit=5
mcporter call --config config/mcporter.json cortex.cortex action=hosts
mcporter call --config config/mcporter.json cortex.cortex action=errors
mcporter call --config config/mcporter.json cortex.cortex action=status
mcporter call --config config/mcporter.json cortex.cortex action=help
Test assertions
The smoke test validates:
- Health endpoint returns
{"status": "ok"} - The single
cortextool is listed cortex searchreturns expectedcountandlogsfieldscortex tailrespects thenparametercortex errorsreturnssummaryarraycortex hostsreturnshostsarraycortex correlatereturnshostsgrouped by hostnamecortex statsreturns numeric fields (total_logs, total_hosts, etc.)cortex statusreturns DB health and runtime/OTLP observability fieldscortex helpreturns non-empty markdown text- When
tests/fixtures/ai-session-smoke.jsonlcan be seeded into the same SQLite database as the server, AI analytics also prove non-emptysessions,search_sessions, andproject_contextresults for the fixture.
Failure output
PASS: health endpoint returns ok
PASS: cortex search returns count field
FAIL: cortex tail count should be <= 10, got 50
---
30 assertions: 29 PASS, 1 FAIL
Exit code is non-zero if any assertion fails.