Skip to content

Conversation

semihbkgr
Copy link
Contributor

Problem

Tests were failing on Windows but passing on macOS and Linux due to differences in how paths are resolved.

Root Cause

  • Windows: t.TempDir() returns 8.3 short names (e.g., RUNNER~1) in GitHub Actions, while filepath.EvalSymlinks() resolves these to long names (e.g., runneradmin). This mismatch caused assertions to fail.
  • macOS: Symlink resolution changes paths consistently (e.g., /var/folders resolving to /private/var/folders), but still preserves substring relationships, so the tests passed (the checks are false negative)
  • Linux: No path changes, tests work as expected

Solution

Normalize all expected paths in the tests by applying filepath.EvalSymlinks() before assertions. This ensures consistent behavior across all platforms: on Windows, it resolves 8.3 short names to their long form, and on macOS, it resolves symlinks to their canonical paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant