A directory says how it reacts to files it does not know; the node-engine moves out what a move-out directory does not know (issue 1024) #117

Merged
mesh-tools merged 2 commits from feat/owned-paths into main 2026-10-17 16:20:06 +00:00
Showing only changes of commit dae79c7643 - Show all commits
+9 -2
View File
@@ -43,9 +43,16 @@ func TestAMoveOutDirectoryKeepsOnlyWhatItKnows(t *testing.T) {
t.Fatal(err)
}
t.Cleanup(apply.UseAccountsFileForTest(passwd))
was := builtFor
// Independent of the machine: an arch host with a pacman on PATH that answers and holds nothing, as
// TestReplay233 puts one there (it answers with an error); nothing here declares a package.
bin := t.TempDir()
if err := os.WriteFile(filepath.Join(bin, "pacman"), []byte("#!/bin/sh\nexit 0\n"), 0o755); err != nil {
t.Fatal(err)
}
t.Setenv("PATH", bin+string(os.PathListSeparator)+os.Getenv("PATH"))
wasBuilt := builtFor
builtFor = "arch"
t.Cleanup(func() { builtFor = was })
t.Cleanup(func() { builtFor = wasBuilt })
stray := filepath.Join(dir, "id_stray")
if err := os.WriteFile(stray, []byte("somebody else's key"), 0o600); err != nil {