Skip to content

Commit

Permalink
ci: update tests (#340)
Browse files Browse the repository at this point in the history
* ci: remove integration test from config test

* config updates + change "warn" to "debug"
  • Loading branch information
adamewozniak authored Jan 18, 2024
1 parent e711438 commit a350a4a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 1 addition & 5 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,12 +758,8 @@ enabled = false
_, err = tmpFile.Write(content)
require.NoError(t, err)

cfg, err := config.ParseConfig(tmpFile.Name())
_, err = config.ParseConfig(tmpFile.Name())
require.NoError(t, err)

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

func TestProviderWithAPIKey_Valid(t *testing.T) {
Expand Down
10 changes: 7 additions & 3 deletions ojo-provider-config/currency-pairs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ quote = "WETH"
base = "stATOM"
providers = [
"osmosis",
"crescent",
]
quote = "ATOM"

Expand Down Expand Up @@ -177,7 +176,6 @@ quote = "USD"
[[currency_pairs]]
base = "JUNO"
providers = [
"bitget",
"mexc",
]
quote = "USDT"
Expand Down Expand Up @@ -222,11 +220,17 @@ quote = "USDT"
base = "INJ"
providers = [
"gate",
"binance",
"mexc",
]
quote = "USDT"

[[currency_pairs]]
base = "INJ"
providers = [
"kraken",
]
quote = "USD"

[[currency_pairs]]
base = "STINJ"
providers = [
Expand Down
4 changes: 2 additions & 2 deletions oracle/provider/price_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (ps *priceStore) GetTickerPrices(pairs ...types.CurrencyPair) (types.Curren
key := ps.currencyPairToTickerPair(cp)
ticker, ok := ps.tickers[key]
if !ok {
ps.logger.Warn().Msgf("failed to get ticker price for %s", key)
ps.logger.Debug().Msgf("failed to get ticker price for %s", key)
continue
}
tickerPrices[cp] = ticker
Expand All @@ -133,7 +133,7 @@ func (ps *priceStore) GetCandlePrices(pairs ...types.CurrencyPair) (types.Curren
key := ps.curencyPairToCandlePair(cp)
candles, ok := ps.candles[key]
if !ok {
ps.logger.Warn().Msgf("failed to get candle prices for %s", key)
ps.logger.Debug().Msgf("failed to get candle prices for %s", key)
continue
}
candlesCopy := make([]types.CandlePrice, 0, len(candles))
Expand Down

0 comments on commit a350a4a

Please sign in to comment.