mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Completes large struct pointer optomisations over the entire codebase and enables hugeParams linter by default
29 lines
743 B
Go
29 lines
743 B
Go
package currency
|
|
|
|
import "testing"
|
|
|
|
func TestRunUpdater(t *testing.T) {
|
|
var newStorage Storage
|
|
|
|
emptyMainConfig := MainConfiguration{}
|
|
err := newStorage.RunUpdater(BotOverrides{}, &emptyMainConfig, "", false)
|
|
if err == nil {
|
|
t.Fatal("Test Failed storage RunUpdater() error cannot be nil")
|
|
}
|
|
|
|
mainConfig := MainConfiguration{
|
|
Cryptocurrencies: NewCurrenciesFromStringArray([]string{"BTC"}),
|
|
FiatDisplayCurrency: USD,
|
|
}
|
|
|
|
err = newStorage.RunUpdater(BotOverrides{}, &mainConfig, "", false)
|
|
if err == nil {
|
|
t.Fatal("Test Failed storage RunUpdater() error cannot be nil")
|
|
}
|
|
|
|
err = newStorage.RunUpdater(BotOverrides{}, &mainConfig, "/bla", false)
|
|
if err != nil {
|
|
t.Fatal("Test Failed storage RunUpdater() error", err)
|
|
}
|
|
}
|