golang/go

all: ensure that tests do not write to the current directory

Open

#28,387 opened on Oct 25, 2018

View on GitHub
 (50 comments) (3 reactions) (0 assignees)Go (19,008 forks)batch import
NeedsFixTestinghelp wanted

Repository metrics

Stars
 (133,883 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

In #27957, @hyangah noticed that the tests for compress/bzip2 fail when GOROOT is not writable, and those tests are run whenever we run go test all in module mode (which is intended to be a useful default).

As noted in #28386, tests should not assume that they can write to the current directory. We should ensure that none of the tests in the standard library make that mistake.

Contributor guide