One predicate for the private network: the filter's accept set is the set the names and the resolver mean; the catalogue is read once for the three mesh-wide questions

This commit is contained in:
2026-09-22 02:04:28 +02:00
parent 6a64aba506
commit 5150c0a0f8
3 changed files with 14 additions and 9 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import (
"testing"
"github.com/novox/mesh-controller/internal/inventory"
"github.com/novox/mesh-controller/internal/overlay"
)
// placementOf is what the mesh holds about where one node is.
@@ -96,7 +97,7 @@ func TestOnlyAMachineOnThePrivateNetworkIsNamed(t *testing.T) {
t.Fatalf("two machines on the network are not both named: %v", names)
}
// The laptop keeps its place and its address, and stops running the network.
if err := open.inventory.Unassign(ctx, "laptop", "mesh-wireguard"); err != nil {
if err := open.inventory.Unassign(ctx, "laptop", overlay.Name); err != nil {
t.Fatal(err)
}
names, err = namesInTheMesh(ctx, open.inventory, shelf)