Files
gocryptotrader/engine/syncer_test.go
Ryan O'Hara-Reid e2d57540a6 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
2019-09-27 16:03:41 +10:00

46 lines
970 B
Go

package engine
import (
"testing"
"time"
"github.com/thrasher-corp/gocryptotrader/config"
)
func TestNewCurrencyPairSyncer(t *testing.T) {
t.Skip()
if Bot == nil {
Bot = new(Engine)
}
Bot.Config = &config.Cfg
err := Bot.Config.LoadConfig("", true)
if err != nil {
t.Fatalf("Test failed. TestNewExchangeSyncer: Failed to load config: %s", err)
}
Bot.Settings.DisableExchangeAutoPairUpdates = true
Bot.Settings.Verbose = true
Bot.Settings.EnableExchangeWebsocketSupport = true
SetupExchanges()
if err != nil {
t.Log("failed to start exchange syncer")
}
Bot.ExchangeCurrencyPairManager, err = NewCurrencyPairSyncer(CurrencyPairSyncerConfig{
SyncTicker: true,
SyncOrderbook: false,
SyncTrades: false,
SyncContinuously: false,
})
if err != nil {
t.Errorf("NewCurrencyPairSyncer failed: err %s", err)
}
Bot.ExchangeCurrencyPairManager.Start()
time.Sleep(time.Second * 15)
Bot.ExchangeCurrencyPairManager.Stop()
}