-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/modindex: fix index directory for tests
The module cache index is written to a subdirectory of os.UserCacheDir(). In non-test circumstances this is the right choice, as it makes the index generally available. In tests this is the wrong choice, as it may leave test remnants behind. This change sets the directory to a subdir os.TempDir for tests. Tests are free to further change modindex.IndexDir. Change-Id: I046e0520adf3e3ffa71cfc8a0dfbdd060e41eb1a Reviewed-on: https://go-review.googlesource.com/c/tools/+/639176 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Robert Findley <[email protected]>
- Loading branch information
Showing
4 changed files
with
32 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters