diff options
author | Bjørn Erik Pedersen <[email protected]> | 2016-09-18 22:04:32 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2016-09-18 22:04:32 +0200 |
commit | bacc1706cbdccb3c692dea175ed3742ac97b4699 (patch) | |
tree | 214fa69e91365496ac7571021b82d0d3e5082b0f /helpers/path_test.go | |
parent | 98c12b7b3de0822d39886a4de5f3b18b295e3c3d (diff) | |
download | hugo-bacc1706cbdccb3c692dea175ed3742ac97b4699.tar.gz hugo-bacc1706cbdccb3c692dea175ed3742ac97b4699.zip |
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
Diffstat (limited to 'helpers/path_test.go')
-rw-r--r-- | helpers/path_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/helpers/path_test.go b/helpers/path_test.go index 9ce61b269..cbdcd8da2 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() |