Skip to main content

Crate sloc_web

Crate sloc_web 

Source

Functions§

build_sub_run
make_test_router
Build a minimal router suitable for integration tests — no TCP binding, no API keys, no TLS.
make_test_router_exhausted_semaphore
Test router where the analysis semaphore is pre-exhausted (0 permits). Immediately returns 503 on POST /analyze, exercising the busy-server branch.
make_test_router_server_mode
Test router with server_mode = true. Exercises server-mode-gated code paths such as the locked watched-bar in trend-reports, path validation in analyze, and upload-only preview restrictions.
make_test_router_tight_rate_limit
Test router with a very tight rate limit (3 req/min). The third request from the same IP (0.0.0.0 when ConnectInfo is absent) returns 429.
make_test_router_with_key
Test router with one API key pre-loaded. Used by auth integration tests.
sanitize_project_label
serve
Errors