mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-31 23:16:54 +00:00
Config overwrite bugfix (#363)
* Fix bug where on parsing an alternate new config it will overwrite main config.json in gct dir * Stop movement of config.json file from root dir when a new config is parsed in * Stop overiding config.json at gct dir with new config.json from root directory * RM LN :D * Fix bug where promptforconfig in config_encryption.go overwrites default config Ensure periphery command packages do not interact or save over configuration Ensure tests to not save over or change current testdata/config
This commit is contained in:
committed by
Adrian Gallagher
parent
6bdbe236c0
commit
e2d57540a6
@@ -27,16 +27,22 @@ func TestSetDefaults(t *testing.T) {
|
||||
|
||||
func TestSetup(t *testing.T) {
|
||||
yobitConfig := config.GetConfig()
|
||||
yobitConfig.LoadConfig("../../testdata/configtest.json")
|
||||
err := yobitConfig.LoadConfig("../../testdata/configtest.json", true)
|
||||
if err != nil {
|
||||
t.Fatal("Test Failed - Yobit load config error", err)
|
||||
}
|
||||
conf, err := yobitConfig.GetExchangeConfig("Yobit")
|
||||
if err != nil {
|
||||
t.Error("Test Failed - Yobit init error")
|
||||
t.Fatal("Test Failed - Yobit init error", err)
|
||||
}
|
||||
conf.API.Credentials.Key = apiKey
|
||||
conf.API.Credentials.Secret = apiSecret
|
||||
conf.API.AuthenticatedSupport = true
|
||||
|
||||
y.Setup(conf)
|
||||
err = y.Setup(conf)
|
||||
if err != nil {
|
||||
t.Fatal("Test Failed - Yobit setup error", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFetchTradablePairs(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user