Problem
The nightly gauntlet is failing on macOS due to test failures in agent/agentcontainers. The issue is a path mismatch in mock expectations where tests expect paths without the /private prefix, but macOS is resolving them with /private.
Failed run: https://github.com/coder/coder/actions/runs/17088219216
Commit: 60d611f
Error Details
Multiple test cases in TestAPI/Create are failing with:
expected call at /Users/runner/work/coder/coder/agent/agentcontainers/api_test.go:2468 doesn't match the argument at index 2.
Got: /private/var/folders/rs/pdkp4bzs6r53dmgkthjgwkpm0000gn/T/go-build1803124527/b1322/agentcontainers.test (string)
Want: is equal to /var/folders/rs/pdkp4bzs6r53dmgkthjgwkpm0000gn/T/go-build1803124527/b1322/agentcontainers.test (string)
Affected Tests
TestAPI/Create/Name
TestAPI/Create/AppDeduplication
TestAPI/Create/WithApps
TestAPI/Create/WithSomeDisplayAppsDisabled
TestAPI/Create/WithAllDisplayApps
TestAPI/Create/WithDefaultDisplayApps
Root Cause
On macOS, /var is a symlink to /private/var, and the system is resolving the full path including the /private prefix. The mock expectations in the tests need to account for this macOS-specific behavior.
Solution
The mock expectations should either:
- Use path resolution to handle the
/private prefix on macOS
- Normalize paths before comparison
- Use more flexible path matching in the mocks
Problem
The nightly gauntlet is failing on macOS due to test failures in
agent/agentcontainers. The issue is a path mismatch in mock expectations where tests expect paths without the/privateprefix, but macOS is resolving them with/private.Failed run: https://github.com/coder/coder/actions/runs/17088219216
Commit: 60d611f
Error Details
Multiple test cases in
TestAPI/Createare failing with:Affected Tests
TestAPI/Create/NameTestAPI/Create/AppDeduplicationTestAPI/Create/WithAppsTestAPI/Create/WithSomeDisplayAppsDisabledTestAPI/Create/WithAllDisplayAppsTestAPI/Create/WithDefaultDisplayAppsRoot Cause
On macOS,
/varis a symlink to/private/var, and the system is resolving the full path including the/privateprefix. The mock expectations in the tests need to account for this macOS-specific behavior.Solution
The mock expectations should either:
/privateprefix on macOS