End-to-End Tests
link-e2e holds the end-to-end tests across the relay, agents, plugins
and demo apps, as one test program, each file a module, so cargo test
links once, not once per file. Run one file with cargo test -p link-e2e --test e2e chat::.
What they share
common holds the programs, and the conformance kit's agent on the
mini harness against a connection's fake, started from them.
The relay and its accounts
accounts (lnk auth login through an account service, and the relay
taking that sign-in), admin (link-relay admin and per-user limits),
roles (three relays, one of each role, each its own domain),
bootstrap (the relay's bootstrap.sh checks what it fetches),
state (link-state import) and updater (the relay updater).
Tunnels and shares
domains (lnk tunnel open --domain, a domain of the user's own),
visitors (lnk tunnel open --account, visitors signing in),
websocket (a visitor's WebSocket passed through), shares (lnk bucket link create links against a real relay) and llm (lnk model share llm, a visitor to the relay to an agent).
Agents
chat (lnk agent chat send, on the mini harness), endpoint (a connection's
bridge to an agent on a harness that speaks no connection), bridges (one
bridge for all of a machine's agents), webhooks (an agent's own
webhooks), measure (lnk measure on an agent running in the
foreground), moving (an agent's move in two phases), packing (a
machine that packs many owners' agents) and conformance (the mini
harness passes the conformance kit).
Specs
agent_specs, box_specs and sandbox_specs read each case of
tests/specs/agent/, box/ and sandbox/ as its type does. box_users
runs a box's users on a stand-in box (lnk box user).
The core and its releases
core_plugins (lnk plugin add and lnk up install only from
releases signed by the key built into lnk), release (lnk upgrade, the
install script and a box accept only signed releases), credentials
(lnk secret list), flags (every command takes its arguments as one
type), help (the core's help says what each plugin's says),
licenses (Link is MIT or Apache-2.0) and parsers (the wire's
parsers, fuzzed).
Documentation quickstarts
The quickstart runner reads each
published opening sh block directly from its owning page. It keeps
quoting, comments and heredocs intact, and runs supported examples in
an isolated home and project with built first-party programs and local
fixtures. Commands are never copied into the test.
Run the examples
Build the workspace's programs first, as for the other end-to-end tests, then run the quickstart module. Each executable case checks its useful result, such as a parsed environment, saved grant or installed program, in addition to checking the command's exit status.
cargo test -p link-e2e --test e2e quickstarts::Review source changes
The coverage registry binds
each page to its shell block's SHA-256 fingerprint and a fixture or an
explicit UNVERIFIED case. New, changed, removed and duplicate entries
fail the inventory check. Review the source, update or add its fixture
and verify the useful result before updating a fingerprint. An ignored
case records a coverage gap and never counts as runtime proof.
What the fixtures cover
Local examples verify environment files and image identities, secret grants through the environment's real principal parser, offline manual content and account persistence through a first-party AWS CLI fake. Signed local releases verify document-helper and webhook installation, plus plugin installation and an upgrade check. The job fixture runs the actual core, environment and job plugins behind a fake sandbox boundary.
Kernel enforcement
The fake job boundary checks that the requested sandbox spec matches the one generated by the source example, then executes that trusted command and checks its job record. Real confinement is a separate ignored test, which fails explicitly if its required kernel support is unavailable. External harness installs, real accounts and cloud machines require their own fixtures or disposable QA environments.
LNK_REQUIRE_SANDBOX=1 LNK_REQUIRE_NATIVE=1 cargo test -p link-e2e --test e2e quickstarts::job_quickstart_kernel_confinement -- --ignored