Skip to content

Build the fake server the suite runs against #21

Description

@iderex

Nothing on this board may require a running Jellyfin server to test. A suite that
needs one is a suite that is green on the machine with the server and unrunnable
everywhere else, and it is the fastest way to lose the headless property in #20.

The fake server is the single largest piece of test infrastructure this
repository will own, and every milestone after this one depends on it, so it is
worth building deliberately rather than growing it one endpoint at a time inside
whatever test needed it first.

What it provides

A loopback HTTP server the suite starts and stops in-process, serving the
endpoints named in the record from #10.

Recorded responses from real servers as fixtures, stored as exact bytes so that
nothing in the checkout pipeline can normalise a byte the fixture exists to
prove. Where a fixture proves something about whitespace or line endings, it is
stored encoded rather than raw. What may not appear in a recording at all, and
the check that refuses it, is #109.

Deliberate misbehaviour on demand. Slow answers, truncated bodies, wrong content
types, a 401 arriving mid-stream, an endpoint that does not exist. These are the
cases the shipping code is built to survive, and they cannot be reached against a
healthy server.

A clock the test controls, so that a timeout test takes microseconds rather than
the timeout.

Done when

The suite starts the fake server on a loopback address, runs against it with no
external network, and every endpoint in #10 has both a healthy fixture and at
least one hostile one. No test in the repository contacts a real server. Blocked
on #10 and #99.

Metadata

Metadata

Assignees

Labels

architectureShape of the core: boundaries, interfaces, contractsblocked-on-issueWaits on another open issue on this boardtests

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions