mesh/merge-gate head 3f97d2d50d57 merged into trunk 6a5e6510cab2 — pass: builds mesh-mail-notifier → g14, shanks; no bus step; every machine composes with …
mesh/repo-check head 3f97d2d50d57 merged into trunk 6a5e6510cab2 — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-…
mesh/delivery delivered
18 lines
879 B
Go
18 lines
879 B
Go
package main
|
|
|
|
import "testing"
|
|
|
|
// TestSendKeyNamesThisMachine proves Send asks its own machine's node-notifier, not the bare seat: a bare
|
|
// "seat:node-notifier.send" is answered by whichever machine's node-notifier takes it first, so notices sent
|
|
// from g14 and shanks were lost to "503 no responders" or another machine's desktop (novox/hq issue 865).
|
|
// desk-channel names the machine it asks the same way ("seat:node-notifier.send@"+machine,
|
|
// modules/desk-channel/cmd/desk-channel/main.go); sendKey must read this machine's own name the same way the
|
|
// SDK's own Emit does, from MESH_NODE, which the runtime sets.
|
|
func TestSendKeyNamesThisMachine(t *testing.T) {
|
|
t.Setenv("MESH_NODE", "g14")
|
|
|
|
if got, want := sendKey(), "seat:node-notifier.send@g14"; got != want {
|
|
t.Fatalf("sendKey() = %q, want %q (it must name this machine, as desk-channel does)", got, want)
|
|
}
|
|
}
|