Skip to content

Commit fedc174

Browse files
authored
Update utils_test.go to allow running in read-only mode. (#91)
Restrict `os.OpenFile` to use just read flag, which allows to pass tests on the systems like Guix with isolated read-only environment.
1 parent 7eaf97a commit fedc174

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestUtilFuncs(t *testing.T) {
1717
is.True(IsConsole(os.Stdout))
1818
is.True(IsConsole(os.Stderr))
1919
is.False(IsConsole(&bytes.Buffer{}))
20-
ff, err := os.OpenFile("README.md", os.O_WRONLY, 0)
20+
ff, err := os.OpenFile("README.md", os.O_RDONLY, 0)
2121
is.NoError(err)
2222
is.False(IsConsole(ff))
2323

0 commit comments

Comments
 (0)