The seat-list case waits for the reader's change instead of racing it; the node build's generated-package fixture carries its domain (issue 1966)

This commit is contained in:
2026-11-05 14:40:30 +01:00
parent 059fa5d4c4
commit 75cf83a656
2 changed files with 9 additions and 1 deletions
@@ -116,6 +116,14 @@ func TestTheMeshsToolsAreReadFromTheBus(t *testing.T) {
}
startSeatList(listBus{"mesh-module-assigner": someSeats()[0], "node-service-manager": someSeats()[1]})
defer func() { seatListMu.Lock(); seatList = nil; seatListMu.Unlock() }()
// The reader reads on its own goroutine: wait for the change it tells (no sleeping).
for !seatList.Status().Heard {
select {
case <-meshChanged:
case <-time.After(10 * time.Second):
t.Fatalf("the seat list was not read: %+v", seatList.Status())
}
}
got, err := ReadMeshToolsFrom(aMesh(t), definedSeats(), resolving)
var addrs []string
for _, r := range got.Replacements {
@@ -13,7 +13,7 @@ import (
// installed from that lock (npm ci) and packed (npm pack) with no build script run, as any package artifact is.
func TestAGeneratedSeatPackageIsInstalledFromItsLockAndPackedWithoutABuild(t *testing.T) {
m, f, work := newMachine(t)
seat := `{"format":1,"seat":"one-store","scope":"mesh","grain":"whole","decision":"ADR 1","verbs":[{"name":"query","input":{"type":"object"},"answer":{"type":"object"}}]}`
seat := `{"format":1,"seat":"one-store","scope":"mesh","grain":"whole","domain":"Module","decision":"ADR 1","verbs":[{"name":"query","input":{"type":"object"},"answer":{"type":"object"}}]}`
src := t.TempDir()
write(t, filepath.Join(src, "seats", "one-store", "seat.json"), seat, 0o644)
g, err := seatgen.Load(src, "example.org/c/go", "@example/c")