ADR 0593 §1 and §7: compose, its bus reader and runtime reader, takein, validate, the overlay generator, the composer's run and mesh-compose, and the judgement of a move leave mesh-sdk for the node-engine's internal packages, so no other module composes and a change to them rebuilds only the node-engine. The shapes others read (the composer's request and verdict, the overlay's names, compositions and answers) stay in mesh-sdk. The node's grant is now a golden file of what the grants part composes, since the composer of the bus's user list leaves mesh-sdk too. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
31 lines
1.0 KiB
Go
31 lines
1.0 KiB
Go
package overlay
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// novox/hq ADR 0222, issue 190: the runtime's file and service are the runtime's module's. The
|
|
// private network writes nothing into either — being on it still grants the right to pull from the
|
|
// mesh's store in the clear (ADR 0082), and the runtime's module states that trust itself.
|
|
func TestTheNetworkWritesNothingOfTheRuntimes(t *testing.T) {
|
|
nodes := []Node{
|
|
{Name: "anchor", Site: "lab", Hub: true, Endpoint: "192.0.2.10:51820", Key: "k1", Address: "10.42.0.1"},
|
|
{Name: "node2", Site: "lab", Key: "k2", Address: "10.42.0.2"},
|
|
}
|
|
g, err := From(nodes, "10.42.0.0/16", "")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
for _, node := range []string{"anchor", "node2"} {
|
|
resources, part, err := g.Resources(node)
|
|
if err != nil || !part {
|
|
t.Fatalf("%s: resources: %v part=%v", node, err, part)
|
|
}
|
|
for _, r := range resources {
|
|
if r["path"] == "/etc/docker/daemon.json" || r["unit"] == "docker.service" {
|
|
t.Errorf("%s: the private network declares the runtime's %v", node, r)
|
|
}
|
|
}
|
|
}
|
|
}
|