mesh/merge-gate out of date: judged against a trunk it does not name, the trunk is now 5c1c6f56c9d9; judged again on a recheck or when it is merged
mesh/repo-check out of date: judged against a trunk it does not name, the trunk is now 5c1c6f56c9d9; judged again on a recheck or when it is merged
mesh/delivery superseded: a newer head of the same pull request
The lab's base image trusts the documentation ranges as plain-HTTP registries, so no genesis bed could see the push to an untrusted registry that issue 92 is about (reviews 73 and 76 on mesh-host #91). The bed takes that trust off the anchor before the installer runs and asks the runtime it trusts loopback only, then runs genesis with --registry 192.0.2.10:5000 and holds that the control plane reaches the registry, trusted by the mesh's name too. The prover gains a bed kind: it builds the node-engine and its installer at each commit, the carried builder from the pinned controller, and raises the bed; a bed that never reached the step it replays skips, and a skip is an error, never the fault reproduced. Not proved yet: genesis stops at step 6 on both sides, because the temporary controller has no MESH_BUS_NATS and the bus template is refused by the installer (issue 146).
52 lines
1.9 KiB
Go
52 lines
1.9 KiB
Go
package replays
|
|
|
|
import (
|
|
"regexp"
|
|
"slices"
|
|
"testing"
|
|
)
|
|
|
|
// Every replay says what happened, what it asserts, where its fix is, and how it is run.
|
|
func TestEveryReplayIsWhole(t *testing.T) {
|
|
seen := map[string]bool{}
|
|
for _, r := range Register {
|
|
if seen[r.ID] {
|
|
t.Errorf("%s is registered twice", r.ID)
|
|
}
|
|
seen[r.ID] = true
|
|
if r.Issue == 0 || r.What == "" || r.Asserts == "" || r.Repository == "" || r.Fix == "" || r.Test == "" {
|
|
t.Errorf("%s does not say its incident, its outcome, its fix and its test: %+v", r.ID, r)
|
|
}
|
|
// By its issue, or — for a replay that is not one core incident's — by a name of its own.
|
|
if !regexp.MustCompile(`^R(\d+|-[a-z][a-z0-9-]*)$`).MatchString(r.ID) {
|
|
t.Errorf("%q is not a replay's id", r.ID)
|
|
}
|
|
switch r.Kind {
|
|
case InRepository, Gate:
|
|
if len(r.Files) == 0 || r.Package == "" {
|
|
t.Errorf("%s runs in its repository and lays no files over the commit", r.ID)
|
|
}
|
|
case Liveness:
|
|
if len(r.Files) == 0 || len(r.With) == 0 {
|
|
t.Errorf("%s runs two repositories and lays the controller's half over its commit: %+v", r.ID, r)
|
|
}
|
|
case Bed:
|
|
if !regexp.MustCompile(`^test/integration/[a-z0-9-]+\.test\.ts$`).MatchString(r.Test) {
|
|
t.Errorf("%s is a bed and names no bed of the lab to raise: %q", r.ID, r.Test)
|
|
}
|
|
if !slices.ContainsFunc(r.With, func(a Also) bool { return a.Repository == "mesh-controller" }) ||
|
|
!slices.ContainsFunc(r.With, func(a Also) bool { return a.Repository == "mesh-catalog" }) {
|
|
t.Errorf("%s is a bed and does not pin the controller and the catalogue it raises: %+v", r.ID, r)
|
|
}
|
|
case Bus, Resolver:
|
|
default:
|
|
t.Errorf("%s is of no kind the prover runs: %q", r.ID, r.Kind)
|
|
}
|
|
}
|
|
for _, issue := range []string{"236", "262", "263", "266"} {
|
|
if _, ok := Find(issue); !ok {
|
|
t.Errorf("to-be 45 Phase 5 is done when the replay of %s fails before its fix and passes after; it has none", issue)
|
|
}
|
|
}
|
|
}
|