origin

command
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Command test-origin is a small, configurable HTTP origin for exercising cadish end-to-end: deterministic synthetic objects, tunable latency, optional flakiness, ETag/Last-Modified, and Range support. It is a test tool, not part of the cadish server.

Usage:

test-origin -addr :9000 -latency 0ms -flaky 0.0

Routes:

GET /obj/<name>?size=<bytes>   deterministic body of <size> bytes (default 64KiB),
                               strong ETag, Last-Modified, Cache-Control, Range-capable
GET /health                    200 OK
GET /slow?ms=<n>               sleep <n> ms then 200 (overrides -latency)
GET /flap                      alternates 200/503 each hit (stampede/hit-for-miss tests)
any other path                 404

The hit counter is exposed at GET /_stats (JSON) so tests can assert request coalescing (N concurrent client requests -> 1 origin hit).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL