From: Bjørn Erik Pedersen Date: Sun, 18 Sep 2016 20:04:32 +0000 (+0200) Subject: helpers: Skip TestGetRealPath on Windows when not in CI X-Git-Tag: v0.17~43 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bacc1706cbdccb3c692dea175ed3742ac97b4699;p=brevno-suite%2Fhugo helpers: Skip TestGetRealPath on Windows when not in CI `os.Symlink` needs administrator rights on Windows, and this seems to be the simplest fix while still getting the tests run on Appveyor. Fixes #2476 --- diff --git a/helpers/path_test.go b/helpers/path_test.go index 9ce61b26..cbdcd8da 100644 --- a/helpers/path_test.go +++ b/helpers/path_test.go @@ -146,6 +146,10 @@ func TestGetRelativePath(t *testing.T) { } func TestGetRealPath(t *testing.T) { + if runtime.GOOS == "windows" && os.Getenv("CI") == "" { + t.Skip("Skip TestGetRealPath as os.Symlink needs administrator rights on Windows") + } + d1, err := ioutil.TempDir("", "d1") defer os.Remove(d1) fs := afero.NewOsFs()