mesh/delivery-group group feat/sdk1 rejected: composed together: the checker's verdict at the members' heads (428d048dd50a): unit: git.novox.be/novox/mesh-sdk/…
mesh/delivery closed: a newer head of the same pull request
mesh/check failed: unit: git.novox.be/novox/mesh-sdk/go/process.TestStatePutWritesAKeyWhole: a Put through a short blackout: 0, mesh-mail's state send…
Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
41 lines
1.5 KiB
Go
41 lines
1.5 KiB
Go
package catalogue
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// Defends novox/hq ADR 0207: a module depends on the node seats that apply its resources.
|
|
|
|
func TestTheSeatsThatApplyResourcesAreTheMeshsOwnAtNodeScope(t *testing.T) {
|
|
for _, name := range []string{ServiceManagerSeat, PackageManagerSeat, ContainerRuntimeSeat} {
|
|
s, ok := SeatNamed(name)
|
|
if !ok {
|
|
t.Fatalf("%s is not in the mesh's set", name)
|
|
}
|
|
if s.Scope != ScopeNode {
|
|
t.Errorf("%s is held per %s, want per node", name, s.Scope)
|
|
}
|
|
}
|
|
// No verbs yet for either new seat: ADR 0207 seeds the package manager without a protocol, and
|
|
// the runtime's verbs wait for ADR 0166's acceptance.
|
|
for _, name := range []string{PackageManagerSeat, ContainerRuntimeSeat} {
|
|
if s, _ := SeatNamed(name); len(s.Serves)+len(s.Accepts)+len(s.Emits) > 0 {
|
|
t.Errorf("%s carries a protocol; ADR 0207 seeds it with none", name)
|
|
}
|
|
}
|
|
}
|
|
|
|
// A module-declared seat's needs are judged exactly as a compiled seat's once were (novox/hq ADR
|
|
// 0220, ADR 0378 §8): "mail" declares the node seat "mail-notifier" needing node-notifier, the
|
|
// mesh's own (desktop notifications); "notifier" claims mail-notifier; "dunst" claims node-notifier,
|
|
// as it does in the real catalogue.
|
|
func mailNotifierAndDunst() map[string]Manifest {
|
|
return shelf(
|
|
Manifest{Module: "mail", DefinesSeats: []SeatDeclaration{{
|
|
Name: "mail-notifier", Scope: ScopeNode, Needs: []string{NotifierSeat},
|
|
}}},
|
|
mod("notifier", nil, nil, nil, Claim{Name: "mail-notifier"}),
|
|
mod("dunst", nil, nil, nil, Claim{Name: NotifierSeat}),
|
|
)
|
|
}
|