Skip to content

Commit 0e9b2f6

Browse files
committed
test(tray): skip Homebrew symlink-resolution test on Windows
isHomebrewPath matches Unix Homebrew prefixes with forward slashes, but TestIsHomebrewPath_ResolvesSymlinks builds Cellar paths via filepath.Join, which yields backslash paths on Windows that can never match. Homebrew is macOS/Linux only, so the symlink scenario is inapplicable on Windows; skip it there while keeping full darwin/linux coverage.
1 parent a495a0d commit 0e9b2f6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

internal/tray/homebrew_path_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package tray
55
import (
66
"os"
77
"path/filepath"
8+
"runtime"
89
"testing"
910
)
1011

@@ -36,6 +37,13 @@ func TestIsHomebrewPath(t *testing.T) {
3637
// Intel-mac reality: /usr/local/bin/mcpproxy-tray is a symlink into the
3738
// Cellar. The check must resolve symlinks before matching prefixes.
3839
func TestIsHomebrewPath_ResolvesSymlinks(t *testing.T) {
40+
// Homebrew is macOS/Linux only, and isHomebrewPath matches Unix prefixes
41+
// with forward slashes. On Windows filepath.Join produces backslash paths
42+
// that can never match, so the symlink-resolution scenario is inapplicable.
43+
if runtime.GOOS == "windows" {
44+
t.Skip("Homebrew paths are Unix-only; symlink resolution test is inapplicable on Windows")
45+
}
46+
3947
dir := t.TempDir()
4048

4149
cellarDir := filepath.Join(dir, "usr", "local", "Cellar", "mcpproxy", "0.47.0", "bin")

0 commit comments

Comments
 (0)