Files
gocryptotrader/currency/storage_test.go
Andrew ca55f2f965 Optimisation: Large struct pointer conversion (final part) (#265)
Completes large struct pointer optomisations over the entire codebase and enables hugeParams linter by default
2019-04-04 15:31:49 +11:00

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)
}
}