diff --git a/go/catalogue/checker_seat_test.go b/go/catalogue/checker_seat_test.go deleted file mode 100644 index 784bf71..0000000 --- a/go/catalogue/checker_seat_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package catalogue - -import ( - "slices" - "testing" -) - -// The try is a verb of the checker's seat and carries the shell command it replaces (ADR 0547 §10, ADR 0245). -func TestTheCheckerSeatServesTheTry(t *testing.T) { - var seat *Seat - for _, s := range defaultSeats { - if s.Name == CheckerSeat { - seat = &s - } - } - if seat == nil || seat.Scope != ScopeMesh { - t.Fatalf("seat = %+v", seat) - } - var names []string - for _, v := range seat.Serves { - names = append(names, v.Name) - if v.Name == "try" && !slices.Equal(v.Replaces, []string{"sh merge-check.sh"}) { - t.Errorf("try replaces %v", v.Replaces) - } - } - if !slices.Equal(names, []string{"try", "try-read", "try-end"}) { - t.Errorf("verbs = %v", names) - } -} diff --git a/go/catalogue/seats_test.go b/go/catalogue/seats_test.go index 3144c31..f5be576 100644 --- a/go/catalogue/seats_test.go +++ b/go/catalogue/seats_test.go @@ -49,6 +49,21 @@ func TestTheSeatsAreAClosedSetAndEachNamesItsDecision(t *testing.T) { []string{"placement", "proposals", "propose", "withdraw", "again", "adopt", "hand-back"}) { t.Errorf("the placement seat is %v, %v", ok, s) } + // The checker's seat serves the try, which replaces the shell's merge check (ADR 0547 §10, ADR 0245). + var checkerVerbs []string + for _, s := range Seats() { + if s.Name == CheckerSeat { + for _, v := range s.Serves { + checkerVerbs = append(checkerVerbs, v.Name) + if v.Name == "try" && strings.Join(v.Replaces, "|") != "sh merge-check.sh" { + t.Errorf("try replaces %v", v.Replaces) + } + } + } + } + if strings.Join(checkerVerbs, ",") != "try,try-read,try-end" { + t.Errorf("the checker seat serves %v", checkerVerbs) + } // Forty-six with the three build seats replacing node-build-agent and the retired mesh-build-machine (novox/hq // ADR 0525 §2, §10); forty-five with node-files (novox/hq ADR 0394); forty-four again once node-reads goes. // Forty-four with node-provisioner (novox/hq ADR 0349 clause 3); forty-three with mesh-provisioner (novox/hq ADR 0349 clause 3); forty-two with mesh-config (novox/hq ADR 0348 §9); forty-one with node-reads (novox/hq ADR 0310); forty with node-nfs-server and node-mounts (novox/hq ADR 0263); thirty-eight with node-resolver (novox/hq ADR 0247); thirty-seven with mesh-delivery (novox/hq ADR 0239); thirty-six since node-resolver-config retired