From 2b13f131792a5e4208a2be568694e95cb1d0232b Mon Sep 17 00:00:00 2001 From: rbajollari Date: Thu, 28 Mar 2024 18:14:24 -0400 Subject: [PATCH] switch order config test --- config/config_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/config_test.go b/config/config_test.go index 363bb5a9..cb66e6ca 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -627,7 +627,7 @@ global-labels = [["chain-id", "ojo-local-testnet"]] require.Equal(t, provider.ProviderBinance, cfg.CurrencyPairs[0].Providers[1]) } -func TestCheckProviderMins_Valid(t *testing.T) { +func TestCheckProviderMins_Invalid(t *testing.T) { tmpFile, err := ioutil.TempFile("", "price-feeder*.toml") require.NoError(t, err) defer os.Remove(tmpFile.Name()) @@ -647,7 +647,6 @@ quote = "USDT" providers = [ "kraken", "binance", - "huobi" ] [[currency_pairs]] @@ -694,10 +693,10 @@ enabled = false logger := zerolog.New(zerolog.ConsoleWriter{Out: os.Stderr}).Level(zerolog.InfoLevel).With().Timestamp().Logger() err = config.CheckProviderMins(context.TODO(), logger, cfg) - require.NoError(t, err) + require.EqualError(t, err, "must have at least 3 providers for ATOM") } -func TestCheckProviderMins_Invalid(t *testing.T) { +func TestCheckProviderMins_Valid(t *testing.T) { tmpFile, err := ioutil.TempFile("", "price-feeder*.toml") require.NoError(t, err) defer os.Remove(tmpFile.Name()) @@ -717,6 +716,7 @@ quote = "USDT" providers = [ "kraken", "binance", + "huobi" ] [[currency_pairs]] @@ -763,7 +763,7 @@ enabled = false logger := zerolog.New(zerolog.ConsoleWriter{Out: os.Stderr}).Level(zerolog.InfoLevel).With().Timestamp().Logger() err = config.CheckProviderMins(context.TODO(), logger, cfg) - require.EqualError(t, err, "must have at least 3 providers for ATOM") + require.NoError(t, err) } func TestProviderWithAPIKey_Valid(t *testing.T) {