Give the judge fixtures mesh-sdk's validator and drop the tests of a validator judge (issue 1391)
The judge fixtures vendor mesh-sdk's validate package, as the controller does; the test of the judge built with a node-engine change's own validator goes with that judge; the replay of issue 867 no longer has the controller change need a validator word of the node-engine's.
This commit is contained in:
@@ -28,10 +28,10 @@ import (
|
||||
|
||||
// TestReplay867 is the replay of novox/hq issue 867, written with only what the controller and the build seat had
|
||||
// before the fix, so mesh-lab's prover can lay it over the commit before. A mesh-host change (#114) and a
|
||||
// mesh-controller change (#346) of one delivery group need each other: the node-engine change's own check reads the
|
||||
// controller's lock beside it, which only the controller change brings; the controller change builds only with the
|
||||
// validator word only the node-engine change brings. Each was read beside the other's repository at the commit the mesh
|
||||
// runs, which holds neither change, so neither could pass its own merge check — and the pair could not merge.
|
||||
// mesh-controller change (#346) of one delivery group: the node-engine change's own check reads the controller's lock
|
||||
// beside it, which only the controller change brings. It was read beside the other's repository at the commit the mesh
|
||||
// runs, which holds neither change, so the node-engine change could not pass its own merge check. (The controller
|
||||
// change once needed the node-engine's validator word too; the validator is mesh-sdk's now, issue 1391.)
|
||||
//
|
||||
// It runs the whole path: the forge announces each pull request (following.PullUpdated), the controller asks
|
||||
// mesh-delivery which pull requests the group holds, the ask is queued for the build seat, and the build seat's check
|
||||
@@ -104,10 +104,9 @@ func r867Commit(t *testing.T, dir string, files map[string]string) string {
|
||||
// r867Controller is a controller whose judge says who it is and the validator word it was built with.
|
||||
func r867Controller(who, extra string) map[string]string {
|
||||
return map[string]string{
|
||||
"go.mod": "module example.org/judge\n\ngo 1.22\n\nrequire github.com/novox/mesh-host v0.0.0\n",
|
||||
"vendor/modules.txt": "# github.com/novox/mesh-host v0.0.0\n## explicit; go 1.22\ngithub.com/novox/mesh-host/validate\n",
|
||||
"vendor/github.com/novox/mesh-host/validate/v.go": "package validate\n\nconst Word = \"the vendored validator\"\n",
|
||||
"vendor/github.com/novox/mesh-host/internal/declaration/d.go": "package declaration\n",
|
||||
"go.mod": "module example.org/judge\n\ngo 1.22\n\nrequire git.novox.be/novox/mesh-sdk/go v0.0.0\n",
|
||||
"vendor/modules.txt": "# git.novox.be/novox/mesh-sdk/go v0.0.0\n## explicit; go 1.22\ngit.novox.be/novox/mesh-sdk/go/validate\n",
|
||||
"vendor/git.novox.be/novox/mesh-sdk/go/validate/v.go": "package validate\n\nconst Word = \"the vendored validator\"\n",
|
||||
"cmd/mesh-controller/main.go": `package main
|
||||
|
||||
import (
|
||||
@@ -161,12 +160,12 @@ func theGroupOfIssue867Into(t *testing.T, base string) *theIssue867 {
|
||||
}
|
||||
// The two pull requests of one group, feat/867.
|
||||
r867Git(t, controller, "checkout", "--quiet", "-b", "feat/867", base)
|
||||
change := r867Controller("the controller", "+validate.More")
|
||||
change := r867Controller("the controller", "")
|
||||
change["lock.txt"] = "foundation: new\n"
|
||||
r.controllerHead = r867Commit(t, controller, change)
|
||||
r867Git(t, controller, "checkout", "--quiet", "main")
|
||||
r867Git(t, host, "checkout", "--quiet", "-b", "feat/867", base)
|
||||
r.hostHead = r867Commit(t, host, map[string]string{"validate/more.go": "package validate\n\nconst More = \" and more\"\n"})
|
||||
r.hostHead = r867Commit(t, host, map[string]string{"notes.txt": "the node-engine change\n"})
|
||||
r867Git(t, host, "checkout", "--quiet", "main")
|
||||
|
||||
followed := func(string) string { return "main" }
|
||||
@@ -217,7 +216,7 @@ func (r *theIssue867) checked(t *testing.T, repo string, number int, head string
|
||||
servingBus.Store(js)
|
||||
t.Cleanup(func() { servingBus.Store(nil) })
|
||||
p := link.PullUpdated{Owner: "novox", Repo: repo, Number: number, Base: "main", Head: "feat/867", Commit: head,
|
||||
Paths: []string{"lock.txt", "validate/more.go", "cmd/mesh-controller/main.go"}, ModuleDirsSaid: true,
|
||||
Paths: []string{"lock.txt", "notes.txt", "cmd/mesh-controller/main.go"}, ModuleDirsSaid: true,
|
||||
MergeCheck: true, MergeCheckSaid: true}
|
||||
if recheck {
|
||||
// As `delivery check --members <one head>` builds it from mesh-delivery's member: no head branch name.
|
||||
@@ -350,7 +349,7 @@ func TestTheRecheckVerbAsksMeshDeliveryOnABusOfItsOwn(t *testing.T) {
|
||||
}
|
||||
t.Cleanup(func() { _ = sub.Unsubscribe() })
|
||||
member := `[{"id":"novox/mesh-host@` + r.hostHead[:12] + `","repository":"novox/mesh-host","base":"main","head":"` +
|
||||
r.hostHead + `","number":114,"paths":["validate/more.go"],"module_dirs_said":true}]`
|
||||
r.hostHead + `","number":114,"paths":["notes.txt"],"module_dirs_said":true}]`
|
||||
if err := deliveryCommand(t.Context(), []string{"check", "--members", member}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user