Skip to content

Commit

Permalink
fix filemode in tests (natefinch#28)
Browse files Browse the repository at this point in the history
This fixes natefinch#20 by using a more restrictive filemode during tests.
  • Loading branch information
natefinch authored Oct 7, 2016
1 parent 514cbda commit e21e5cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestMaintainMode(t *testing.T) {

filename := logFile(dir)

mode := os.FileMode(0770)
mode := os.FileMode(0600)
f, err := os.OpenFile(filename, os.O_CREATE|os.O_RDWR, mode)
isNil(err, t)
f.Close()
Expand Down
2 changes: 1 addition & 1 deletion lumberjack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ localtime = true`[1:]
func makeTempDir(name string, t testing.TB) string {
dir := time.Now().Format(name + backupTimeFormat)
dir = filepath.Join(os.TempDir(), dir)
isNilUp(os.Mkdir(dir, 0777), t, 1)
isNilUp(os.Mkdir(dir, 0700), t, 1)
return dir
}

Expand Down

0 comments on commit e21e5cb

Please sign in to comment.