Take the resolver off before expecting a machine to leave the network
mesh-resolver requires name resolution, which requires the network — so unassigning the domain module alone leaves the machine on the network, pulled back by its own requirement. The mesh was right and the test was wrong. Which is the requirement graph doing its job: a module cannot quietly lose something it depends on because somebody removed the thing that first brought it in.
This commit is contained in:
@@ -1342,6 +1342,11 @@ test("every name under a machine resolves to that machine", {
|
||||
// It follows the machines. A node leaving the private network must stop being answered for,
|
||||
// because a wildcard pointing at nothing resolves and then hangs — where an unresolvable name
|
||||
// fails at once and says which name it was.
|
||||
//
|
||||
// Both, and that is not tidiness: `mesh-resolver` requires name resolution, which requires the
|
||||
// network, so unassigning the domain module alone leaves the machine on the network — pulled
|
||||
// back by its own requirement. The mesh was right and this test was wrong the first time.
|
||||
await mesh("unassign laptop mesh-resolver");
|
||||
await mesh("unassign laptop networking");
|
||||
await mesh("push anchor");
|
||||
await new Promise((r) => setTimeout(r, 15_000));
|
||||
@@ -1354,7 +1359,6 @@ test("every name under a machine resolves to that machine", {
|
||||
|
||||
await mesh("assign laptop networking");
|
||||
await mesh("unassign anchor mesh-resolver");
|
||||
await mesh("unassign laptop mesh-resolver");
|
||||
await mesh("push");
|
||||
await new Promise((r) => setTimeout(r, 15_000));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user