Final-image testing
Exercise the exact entrypoint, PID 1 behavior, runtime environment, and image contents.
Draincheck starts a Docker or Podman container, holds real work across SIGTERM, and turns readiness withdrawal, request draining, telemetry flushes, and clean exit into one repeatable contract.
$ draincheck verify checkout:local
✓ container ready in 182ms
✓ 4 requests active at SIGTERM
✓ readiness withdrawn in 41ms
✓ in-flight work completed
✓ exited cleanly in 326ms
PASS lifecycle contract satisfiedWhy Draincheck
Draincheck is not a load tester or orchestrator. It verifies the lifecycle behavior of one final image using bounded traffic and stable evidence that any pipeline can retain.
Exercise the exact entrypoint, PID 1 behavior, runtime environment, and image contents.
Use stable exit codes plus JSON, JUnit, and bounded debug artifacts in ordinary CI jobs.
Drive HTTP, gRPC, streams, or a repository-owned command while termination begins.
Label every resource, bind random loopback ports, and remove only the container created for the run.
One run, one decision
The useful question is not whether a container stops. It is whether it stops accepting work, finishes what it already owns, flushes critical signals, and exits before its budget expires.
Use the same entrypoint, environment, and image contents the pipeline may release.
Wait for HTTP, gRPC Health, or an image-owned command to report ready.
Keep requests, streams, or repository-owned command traffic active.
Send the configured signal and observe withdrawal, completion, and exit.
Return a CI verdict and write machine-readable reports for every outcome.
A small, reviewable contract
Keep the lifecycle expectation beside the application. Draincheck supplies strict defaults, validates unknown fields, and lets explicit YAML override every meaningful deadline or assertion.
version: 1
target:
image: checkout:local
container_port: 8080
readiness:
path: /ready
startup_timeout: 10s
traffic:
request:
path: /work?delay=2s
count: 4
concurrency: 4
shutdown_after: 200ms
shutdown:
signal: SIGTERM
deadline: 15sEvidence that survives the job
Console output stays concise. Deeper evidence is written atomically, bounded before capture, and ready for the CI system your team already uses.
A stable automation contract with events, assertions, timings, and final runtime state.
Assertion-level test cases that appear naturally in existing CI test-report views.
Bounded logs, redacted configuration, timeline, and container state in one artifact.
One CLI step. One YAML file. No control plane.
Start with a non-blocking service pilot, keep the reports, and promote the check only when the scenario exercises work your team considers meaningful.