forked from thrasher-corp/gocryptotrader
-
Notifications
You must be signed in to change notification settings - Fork 1
/
syncer_test.go
45 lines (36 loc) · 961 Bytes
/
syncer_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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("TestNewExchangeSyncer: Failed to load config: %s", err)
}
Bot.Settings.DisableExchangeAutoPairUpdates = true
Bot.Settings.Verbose = true
Bot.Settings.EnableExchangeWebsocketSupport = true
Bot.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()
}