From e21e5cbec0cd0861b9dc302736ad5666c529d93f Mon Sep 17 00:00:00 2001 From: Nate Finch Date: Fri, 7 Oct 2016 14:40:28 -0400 Subject: [PATCH] fix filemode in tests (#28) This fixes #20 by using a more restrictive filemode during tests. --- linux_test.go | 2 +- lumberjack_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux_test.go b/linux_test.go index 40f3446..1c61399 100644 --- a/linux_test.go +++ b/linux_test.go @@ -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() diff --git a/lumberjack_test.go b/lumberjack_test.go index 8c0e685..5e8422a 100644 --- a/lumberjack_test.go +++ b/lumberjack_test.go @@ -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 }