Pass the conformance tests¶
Prove that a Nereid serves every verb of every kind of its reef, with the status its contract declares, before anyone else relies on it.
Before you start¶
- A throwaway k3d cluster, never the kept cluster
k3d-nereus: the check creates and deletes objects, and refuses any other context. - The Nereid applied and
Ready(Build a Nereid's image), and named by the reef's default Mandate.
Steps¶
1. Ship a sample per kind¶
Each kind of the reef has a sample in its contract, cli/src/nereus/interfaces/<reef>/samples/<kind>.yaml: the objects the kind needs first, the object as created, then the same object with a change to its spec. The release reef ships release.yaml, repository.yaml, source.yaml and target.yaml.
2. Write the status the contract declares¶
Every object the Nereid answers gets a Ready condition whose reason the contract declares, status.observedGeneration, and the finalizer <reef>.getnereus.dev/cleanup, removed only once what it made is gone. A kind the Nereid does nothing with still answers, with the reason NotApplicable.
3. Run the check¶
test/conformance drives nereus and kubectl kind by kind: apply with --dry-run then for real, the status checked against the kind's schema, the finalizer, a change, get, list, then delete.
test/conformance release --nereid reference-release
✓ reference-release serves every verb of every kind of the release reef and honours its contract: Release Repository Source Target
--timeout sets the seconds each wait lasts, 120 by default.
Check it worked¶
The last line of the run names every kind it proved; any FAIL: line before it names the object, the field and the rule it breaks.
make scene-release runs the same check against the reference Nereid, then against flux.
Next¶
- See what happened when a step of the check fails.
- Require a reef.