From dae79c76434c11cee5c1a6280cc7adcb997ac6f0 Mon Sep 17 00:00:00 2001 From: mesh-tools Date: Sat, 17 Oct 2026 16:16:02 +0000 Subject: [PATCH] Prove move-out on a machine that is not Arch (issue 1024) The merge check's build container has no pacman, so the acceptance test now stubs it and names the host it was built for, as other command tests do; nothing in the node-engine itself changes. --- cmd/mesh-host/move_out_test.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmd/mesh-host/move_out_test.go b/cmd/mesh-host/move_out_test.go index 579c936..53dc445 100644 --- a/cmd/mesh-host/move_out_test.go +++ b/cmd/mesh-host/move_out_test.go @@ -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 {