mesh-grants: test that node-uplink's machine event reaches no other node's membership or grant
Code review round 2: §4a says the grant and the membership cover the holder's own node's subjects only. Add the negative row beside C-1's: a tool runner on node a, carrying networkmanager, is neither listed for nor granted sign-in-asked.b. Passes already (onMachine substitutes the tool runner's own node and nothing else), proving the fix does not overreach. Builds: design 08 sign-in-page §4a
This commit is contained in:
@@ -919,6 +919,10 @@ func healthChecks(t *testing.T) {
|
||||
Declared{Module: "networkmanager", Holds: []Seat{{Name: "node-uplink", Scope: "node", Emits: []string{"sign-in-asked"},
|
||||
EventSubjects: map[string]string{"sign-in-asked": "sign-in-asked.<node>"}}}},
|
||||
"mesh.seat.node-uplink.event.sign-in-asked.a", true},
|
||||
{"a carried module's own seat's machine event is composed for no other node (design 08 sign-in-page §4a)",
|
||||
Declared{Module: "networkmanager", Holds: []Seat{{Name: "node-uplink", Scope: "node", Emits: []string{"sign-in-asked"},
|
||||
EventSubjects: map[string]string{"sign-in-asked": "sign-in-asked.<node>"}}}},
|
||||
"mesh.seat.node-uplink.event.sign-in-asked.b", false},
|
||||
} {
|
||||
m := MembershipFor("a", c.d, Assignments{})
|
||||
listed := m.SeatTraffic != nil && slices.ContainsFunc(m.SeatTraffic.Publish, func(p string) bool { return p == c.subject })
|
||||
|
||||
Reference in New Issue
Block a user