The main difference here is the GOMOD variable ("Volumes/workplace/argot/go.mod" vs "/Users/samarkis/workplace/argot/go.mod"). However, it cannot be modified:
❯ go env -w GOMOD=/Volumes/workplace/argot/go.mod
go: GOMOD cannot be modified
The issue is that /Volumes/workplace is a symlink to /Users/samarkis/workplace. When doing string comparisons of filenames in tests, the difference in directory names causes the tests to fail.
The fix
Evaluating the symlinks when parsing directory paths should fix the tests.
make test
fails on my machine when I run it in the terminal app but passes when I run it in the GoLand terminal.Comparing
go env
go env
output in GoLand:go env
output in Terminal:Results
The main difference here is the
GOMOD
variable ("Volumes/workplace/argot/go.mod" vs "/Users/samarkis/workplace/argot/go.mod"). However, it cannot be modified:The issue is that
/Volumes/workplace
is a symlink to/Users/samarkis/workplace
. When doing string comparisons of filenames in tests, the difference in directory names causes the tests to fail.The fix
Evaluating the symlinks when parsing directory paths should fix the tests.