Skip to main content

Day 2: Expanding Route Coverage And Isolating Smoke CI

· 2 min read
epifanio
Maintainer, FastAPI-mapserver

The second day focused on confidence: more route-level tests, better job coverage, and a cleaner split between unit validation and runtime smoke checks.

Use a {/* truncate */} comment to limit blog post size in the list view.

The most important work was around the API surface that operators and workflows actually hit.

On the job side, the test suite now covers more of the behavior that tends to regress quietly:

  • listing jobs with refresh behavior for non-terminal states
  • status shaping for success, in-progress, failure, and unknown job IDs
  • delete and cleanup routes, including tombstone recording and status-based cleanup

Outside the jobs router, coverage was extended to routes that define the operator experience:

  • auth endpoints for /token and /login
  • config and service-health endpoints
  • lightweight dataset listing, duplicate reporting, and missing HySpex variant reporting

This mattered because the runtime story here is bigger than one task queue. The platform depends on consistent behavior across auth, config persistence, dataset state, job manifests, and cache-related routes.

The other major change was CI structure. Instead of keeping everything in one path, the workflow now separates concerns more cleanly:

  • unit remains the fast, containerized baseline
  • integration stays as its own stage for broader behavior
  • smoke now starts the runtime container and validates the health, login, and protected dataset flow independently

The smoke script itself also became less optimistic. It now waits for the health endpoint before trying auth and protected requests, which is the difference between a flaky runner and a useful runtime signal.

Locally, validating that path exposed an environment truth that CI runners usually hide: host ports were already occupied by long-running containers. Once that was understood, the runtime flow was still verified from the live container context, which confirmed that the smoke sequence itself was correct even though the local host bindings were not clean.

The outcome is straightforward: the documentation now explains the system more accurately, and the tests do a better job of protecting the routes and workflows that define how the service is actually used.