mirror of
https://github.com/rclone/rclone.git
synced 2025-04-01 10:56:18 +02:00
version: fix test under Windows
This commit is contained in:
parent
84ef6b2ae6
commit
5c75453aba
@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ncw/rclone/cmd"
|
"github.com/ncw/rclone/cmd"
|
||||||
@ -21,7 +22,9 @@ func TestVersionWorksWithoutAccessibleConfigFile(t *testing.T) {
|
|||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
}()
|
}()
|
||||||
assert.NoError(t, tempFile.Close())
|
assert.NoError(t, tempFile.Close())
|
||||||
assert.NoError(t, os.Chmod(path, 0000))
|
if runtime.GOOS != "windows" {
|
||||||
|
assert.NoError(t, os.Chmod(path, 0000))
|
||||||
|
}
|
||||||
// re-wire
|
// re-wire
|
||||||
oldOsStdout := os.Stdout
|
oldOsStdout := os.Stdout
|
||||||
oldConfigPath := config.ConfigPath
|
oldConfigPath := config.ConfigPath
|
||||||
|
Loading…
Reference in New Issue
Block a user