M0 uplink-tools: the holder's own part beside the copies
main.go, still the copy both holders of node-uplink carry, now takes each holder's own subcommands, tools and start work from its manager.go, so networkmanager can add its watcher and tools while systemd-networkd serves the two seat verbs as before. Builds: design 08 sign-in-page §11
This commit is contained in:
@@ -27,3 +27,16 @@ func TestNetworkctlIsReadPerLink(t *testing.T) {
|
||||
t.Fatalf("read %+v", links)
|
||||
}
|
||||
}
|
||||
|
||||
// systemd-networkd serves the seat's two verbs and nothing of its own: no subcommand, no tool, no work at its start
|
||||
// (design 08 sign-in-page §11, §28).
|
||||
func TestNetworkdServesTheSeatsVerbsAlone(t *testing.T) {
|
||||
own := holder(Machine{})
|
||||
if len(own.Commands) != 0 || len(own.Tools) != 0 || own.Start != nil {
|
||||
t.Fatalf("systemd-networkd adds %+v", own)
|
||||
}
|
||||
served := tools(Machine{}, own)
|
||||
if len(served) != 2 || served[0].Name != "node-uplink.resolvers" || served[1].Name != "node-uplink.links" {
|
||||
t.Fatalf("served %v", served)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user