mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-24 01:01:41 +00:00
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
This commit is contained in:
parent
98c12b7b3d
commit
bacc1706cb
1 changed files with 4 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue