mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
* First pass at adding new logging system * NewLogger * NewLogger * WIP * silly bug fix * :D removed files * removed old logging interface * added tests * added tests * Started to add new lines to all f calls * Added subsystem log types * Logger improvements * Further performance improvements * changes to logger and sublogger creation * Renamed Logging types * removed old print statement * changes based on feedback * moved sublogger types to own file * :) * added console as output type * added get level command * added get/set log level via grpc command * added check for output being empty for migration support * first pass at log rotation * added log rotation * :D derp fixed * added tests * changes based on feedback * changed log type * comments * renamed file -> fileSettings * typo fix * changes based on feedback * gofmt ran on additional files * gofmt ran on additional files
46 lines
960 B
Go
46 lines
960 B
Go
package engine
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/thrasher-/gocryptotrader/config"
|
|
)
|
|
|
|
func TestNewCurrencyPairSyncer(t *testing.T) {
|
|
t.Skip()
|
|
|
|
if Bot == nil {
|
|
Bot = new(Engine)
|
|
}
|
|
Bot.Config = &config.Cfg
|
|
err := Bot.Config.LoadConfig("")
|
|
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()
|
|
}
|