Fix config tests to save configData which fixes subsequent tests

This commit is contained in:
Nick Craig-Wood 2017-06-28 20:50:47 +01:00
parent 54561fd2bc
commit e54087ece1

View File

@ -56,15 +56,18 @@ func TestCRUD(t *testing.T) {
oldOsStdout := os.Stdout
oldConfigFile := configFile
oldConfig := Config
oldConfigData := configData
oldReadLine := ReadLine
os.Stdout = nil
configFile = &path
Config = &ConfigInfo{}
configData = nil
defer func() {
os.Stdout = oldOsStdout
configFile = oldConfigFile
ReadLine = oldReadLine
Config = oldConfig
configData = oldConfigData
}()
LoadConfig()