From c5a274dbfb8e359eeb8141473fdfe74dc05df03b Mon Sep 17 00:00:00 2001 From: Lee Sang Hoon Date: Fri, 26 Jun 2026 18:30:57 +0900 Subject: [PATCH] test: make install test fixture hermetic --- internal/install/mcp_install_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/install/mcp_install_test.go b/internal/install/mcp_install_test.go index 5845525..de95c45 100644 --- a/internal/install/mcp_install_test.go +++ b/internal/install/mcp_install_test.go @@ -5,6 +5,7 @@ import ( "context" "os" "os/exec" + "path/filepath" "strings" "testing" ) @@ -669,13 +670,14 @@ func TestMCPInstall_Run_RegistersWhenAbsent(t *testing.T) { // pre-check. It accepts the common CLI output formats and rejects // incidental mentions of "guild" inside command-value strings. func TestScanForGuildEntry(t *testing.T) { + guildBin := filepath.Join(t.TempDir(), "guild") cases := []struct { name string in string want bool wantPath string }{ - {"claude human", "guild: /usr/local/bin/guild mcp serve\n", true, "/usr/local/bin/guild"}, + {"claude human", "guild: " + guildBin + " mcp serve\n", true, guildBin}, {"list marker", "- guild\n- other\n", true, ""}, {"bare token", "guild\n", true, ""}, {"mixed list", " * other\n * guild: /bin/guild\n", true, "/bin/guild"},