testserver

command
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Overview

testserver runs the sync engine with the test entities (Todo, Widget), the complete_all mutator and a deny-rule permission hook. The integration suites spawn it on port 0 and read the address from stdout. With -access it serves the access-model test schema instead, and /debug/trusted to seed its grant rows.

It also serves permissive CORS and a /debug/rpc counter endpoint so the browser e2e suite can reach it from the harness origin and assert what did (and did not) reach the server; see debug.go.

Blobs are kept in memory, so BlobService works in either schema; the default one carries the entities that refer to them (blob_holder, blob_tree, blob_ledger).

With -forward it runs two engines in one process: an origin with the default schema on its own listener, and a local engine linked to it through engine/upstream, served on the LISTENING address; see forward.go.

A second listener answers each TCP connection as a tunnel (engine/tunnel) to the same handlers, and its address is printed as "TUNNEL tcp://…" before the LISTENING line.

Jump to

Keyboard shortcuts

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