Skip to content

testapi

Version 2026.144.1443
Repo superproject

A FastAPI test service answering HTTP on port 9090 under supervisord Installs fastapi + uvicorn into a pixi environment and copies app.py (the FastAPI app exposing GET / and GET /health) into the service working directory. supervisord runs uvicorn app:app on 0.0.0.0:9090, so the running container answers HTTP 200 on / ({“status”:“ok”}) and /health ({“healthy”:true}). Every claim below is independently checked.

  • testapi

This candy’s plan: — the runnable spec charly check executes against a live deployment. check: steps are idempotent probes; run: steps change state.

Intent Step
run mkdir=${HOME}/testapi
run copy=app.py
check the FastAPI application module is installed in the service working directory
check the pixi environment can import the fastapi and uvicorn modules
check a GET request to /health on the running service returns HTTP 200
check a GET request to / reports a JSON status of ok
check file=/home/user/.pixi/envs/default/bin/uvicorn
check service=testapi
check addr=127.0.0.1:${HOST_PORT:9090}
check http=http://127.0.0.1:${HOST_PORT:9090}/
check http=http://127.0.0.1:${HOST_PORT:9090}/health