1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-28 17:03:58 +08:00

disable perm check in serialize_test.go/TestConfig on windows

License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
Łukasz Magiera
2018-01-31 15:40:11 +01:00
parent f1c4df8999
commit 2b6641dbd0

View File

@ -2,6 +2,7 @@ package fsrepo
import ( import (
"os" "os"
"runtime"
"testing" "testing"
config "github.com/ipfs/go-ipfs/repo/config" config "github.com/ipfs/go-ipfs/repo/config"
@ -27,7 +28,10 @@ func TestConfig(t *testing.T) {
if err != nil { if err != nil {
t.Fatalf("cannot stat config file: %v", err) t.Fatalf("cannot stat config file: %v", err)
} }
if g := st.Mode().Perm(); g&0117 != 0 {
t.Fatalf("config file should not be executable or accessible to world: %v", g) if runtime.GOOS != "windows" { // see https://golang.org/src/os/types_windows.go
if g := st.Mode().Perm(); g&0117 != 0 {
t.Fatalf("config file should not be executable or accessible to world: %v", g)
}
} }
} }