Skip to content

Commit e21e5cb

Browse files
authored
fix filemode in tests (#28)
This fixes #20 by using a more restrictive filemode during tests.
1 parent 514cbda commit e21e5cb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

linux_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func TestMaintainMode(t *testing.T) {
1515

1616
filename := logFile(dir)
1717

18-
mode := os.FileMode(0770)
18+
mode := os.FileMode(0600)
1919
f, err := os.OpenFile(filename, os.O_CREATE|os.O_RDWR, mode)
2020
isNil(err, t)
2121
f.Close()

lumberjack_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ localtime = true`[1:]
635635
func makeTempDir(name string, t testing.TB) string {
636636
dir := time.Now().Format(name + backupTimeFormat)
637637
dir = filepath.Join(os.TempDir(), dir)
638-
isNilUp(os.Mkdir(dir, 0777), t, 1)
638+
isNilUp(os.Mkdir(dir, 0700), t, 1)
639639
return dir
640640
}
641641

0 commit comments

Comments
 (0)