forked from TrueCloudLab/rclone
Fix config tests to save configData which fixes subsequent tests
This commit is contained in:
parent
54561fd2bc
commit
e54087ece1
1 changed files with 3 additions and 0 deletions
|
@ -56,15 +56,18 @@ func TestCRUD(t *testing.T) {
|
||||||
oldOsStdout := os.Stdout
|
oldOsStdout := os.Stdout
|
||||||
oldConfigFile := configFile
|
oldConfigFile := configFile
|
||||||
oldConfig := Config
|
oldConfig := Config
|
||||||
|
oldConfigData := configData
|
||||||
oldReadLine := ReadLine
|
oldReadLine := ReadLine
|
||||||
os.Stdout = nil
|
os.Stdout = nil
|
||||||
configFile = &path
|
configFile = &path
|
||||||
Config = &ConfigInfo{}
|
Config = &ConfigInfo{}
|
||||||
|
configData = nil
|
||||||
defer func() {
|
defer func() {
|
||||||
os.Stdout = oldOsStdout
|
os.Stdout = oldOsStdout
|
||||||
configFile = oldConfigFile
|
configFile = oldConfigFile
|
||||||
ReadLine = oldReadLine
|
ReadLine = oldReadLine
|
||||||
Config = oldConfig
|
Config = oldConfig
|
||||||
|
configData = oldConfigData
|
||||||
}()
|
}()
|
||||||
|
|
||||||
LoadConfig()
|
LoadConfig()
|
||||||
|
|
Loading…
Reference in a new issue