Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion cmd/internal/agentworkspace/docker_darwin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package agentworkspace
import (
"os"
"path/filepath"
"slices"
"strings"
"testing"
)
Expand Down Expand Up @@ -32,7 +33,13 @@ func TestFindDarwinDockerCLIRancherDesktopPath(t *testing.T) {
home := t.TempDir()
rancher := filepath.Join(home, ".rd", "bin", "docker")
writeExecutable(t, rancher)
path, err := findDarwinDockerCLIInPaths(darwinDockerCandidatePaths(home))
if !slices.Contains(darwinDockerCandidatePaths(home), rancher) {
t.Fatal("Rancher Desktop path missing from Docker CLI candidates")
}
// Use test-owned candidates so an installed Docker CLI cannot shadow the fixture.
path, err := findDarwinDockerCLIInPaths(
[]string{filepath.Join(home, "missing", "docker"), rancher},
)
if err != nil || path != rancher {
t.Fatalf("find docker CLI = %q, %v; want %q", path, err, rancher)
}
Expand Down
Loading