Skip to content

Commit

Permalink
disable perm check in serialize_test.go/TestConfig on windows
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
  • Loading branch information
magik6k committed Feb 4, 2018
1 parent f1c4df8 commit 2b6641d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions repo/fsrepo/serialize/serialize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package fsrepo

import (
"os"
"runtime"
"testing"

config "github.com/ipfs/go-ipfs/repo/config"
Expand All @@ -27,7 +28,10 @@ func TestConfig(t *testing.T) {
if err != nil {
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)
}
}
}

0 comments on commit 2b6641d

Please sign in to comment.