Ready End-to-end Tests

link-unreleased-e2e tests what's ready end to end: the environment, job and policy spec cases, and each plugin's command line. It's one program, each file a module, so cargo test links once, not once per file.

Run it

Run the whole test program to check the integrated contracts, or filter by its module name to run one area. Both commands run from the public Cargo workspace and use its shared test target.

cargo test -p link-unreleased-e2e --test e2e
# one module
cargo test -p link-unreleased-e2e --test e2e job_specs::

The spec cases

Each case is a file of its own under tests/specs/, and a new case is a new file. Every spec that reads is printed and read back as itself.

Environment cases

tests/specs/env/*.toml: an environment file as a user writes it ([spec]), the files it names where a case gives them ([files], any other written as an empty sandbox spec), and what must come of it ([expect]): the stages saved in its image and those run at every start, in order, or the words of the error when it's invalid.

Job cases

tests/specs/job/*.toml: a job file as a user writes it ([spec]), the environment file it names if a case gives one ([env]), the files they name, and what must come of it: its name and its stages, in order, or the words of the error when it's invalid.

Policy cases

tests/specs/policy/*.toml: a policy as a person writes it, the [access] of the resources it's checked on, and its name or its error. Then each [[check]], a principal, an action and a resource, and the words of the answer, and each [[usage]] within the policy's limits or the one it exceeds.

Each plugin's command line

As the public workspace checks its own: every command takes its arguments as one type (link_plugin::spec::check_commands), help.toml says every command's help and nothing else, and actions.toml holds the typed parser's arguments.