@cryptotaxi247 / kubo / commits / 2b6641dbd

disable perm check in serialize_test.go/TestConfig on windows

License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>

Łukasz Magiera committed Jan 31, 2018 at 15:40 UTC 2b6641dbd0de0560e8c05a6e255257f9ac55ba12
1 file changed +6 -2
repo/fsrepo/serialize/serialize_test.go
+6 -2
@@ -2,6 +2,7 @@ package fsrepo
2
3 import (
4 "os"
5 + "runtime"
6 "testing"
7
8 config "github.com/ipfs/go-ipfs/repo/config"
@@ -27,7 +28,10 @@ func TestConfig(t *testing.T) {
28 if err != nil {
29 t.Fatalf("cannot stat config file: %v", err)
30 }
30 - if g := st.Mode().Perm(); g&0117 != 0 {
31 - t.Fatalf("config file should not be executable or accessible to world: %v", g)
31 +
32 + if runtime.GOOS != "windows" { // see https://golang.org/src/os/types_windows.go
33 + if g := st.Mode().Perm(); g&0117 != 0 {
34 + t.Fatalf("config file should not be executable or accessible to world: %v", g)
35 + }
36 }
37 }