Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use non-local tempdirs in import export tests #25

Closed
wants to merge 1 commit into from
Closed

Use non-local tempdirs in import export tests #25

wants to merge 1 commit into from

Conversation

frncmx
Copy link

@frncmx frncmx commented Aug 9, 2020

Given a project uses Go modules and has universal-translator as
a dependency, then go test all will fail with permission errors.

Cause: The Go tool runs tests under pkg/mod and the packages
are readonly. The failing tests tried to create directories there.

Fixes #24

Given a project uses Go modules and has `universal-translator` as
a dependency, then `go test all` will fail with permission errors.

Cause: The Go tool runs tests under `pkg/mod` and the packages
are readonly. The failing tests tried to create directories there.

Fixes #24

Signed-off-by: Ferenc Szabo <[email protected]>
@frncmx
Copy link
Author

frncmx commented Aug 9, 2020

A "slight" mistake I made: t.Cleanup is only available from Go v1.14. (https://golang.org/doc/go1.14#testing)

If you don't plan to bump the Go version in go.mod, then I'll look for a different cleanup solution.
FYI: v1.15 is going to have t.TempDir() builtin.

@frncmx frncmx closed this by deleting the head repository Jun 18, 2024
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.

go test all fails for all dependent projects
1 participant