2
0

fix filemode in tests (#28)

This fixes #20 by using a more restrictive filemode during tests.
This commit is contained in:
Nate Finch
2016-10-07 14:40:28 -04:00
committed by GitHub
parent 514cbda263
commit e21e5cbec0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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
}