Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coingecko check should be moved out of unit tests #189

Open
4 tasks
zarazan opened this issue Jun 28, 2023 · 0 comments
Open
4 tasks

Coingecko check should be moved out of unit tests #189

zarazan opened this issue Jun 28, 2023 · 0 comments

Comments

@zarazan
Copy link
Contributor

zarazan commented Jun 28, 2023

Summary

Problem Definition

Unit tests should not hit outside services. This will prevent the required unit tests check from blocking PRs when the coingecko API is not responding.

OR - we should mock the API response in the unit tests and move anything testing the API request to an integration test if we still need it.

Sample failure output:

=== RUN TestCheckProviderMins_Valid
3:59PM WRN Coin gecko found 0 providers for OJO
3:59PM INF providers supporting ATOM: [BingX WhiteBIT Gate.io DigiFinex LBank Binance Phemex BitMart Bitget MEXC XT.COM CITEX Deepcoin P2B Bybit CoinTR Pro Dex-Trade OKX Helix KuCoin PointPay AscendEX (BitMax) Huobi Toobit DIFX Trubit BTCEX QMall CoinEx BtcTurk PRO LATOKEN LocalTrade Coinbase Exchange Bitazza BitStorage FameEX Kraken Poloniex Binance US Bitfinex Bitci TR]
3:59PM INF providers supporting USDT: [Bitfinex Kraken Crypto.com Exchange Coinbase Exchange WhiteBIT BTSE Coinzoom]
--- PASS: TestCheckProviderMins_Valid (1.60s)
=== RUN TestCheckProviderMins_Invalid
3:59PM WRN Coin gecko found 0 providers for OJO
--- PASS: TestCheckProviderMins_Invalid (0.54s)
=== RUN TestProviderWithAPIKey_Valid
3:59PM INF providers supporting ATOM: [BingX WhiteBIT Gate.io DigiFinex LBank Binance Phemex BitMart Bitget MEXC XT.COM CITEX Deepcoin P2B Bybit CoinTR Pro Dex-Trade OKX Helix KuCoin PointPay AscendEX (BitMax) Huobi Toobit DIFX Trubit BTCEX QMall CoinEx BtcTurk PRO LATOKEN LocalTrade Coinbase Exchange Bitazza BitStorage FameEX Kraken Poloniex Binance US Bitfinex Bitci TR]
3:59PM INF providers supporting USDT: [Bitfinex Kraken Crypto.com Exchange Coinbase Exchange WhiteBIT BTSE Coinzoom]
3:59PM ERR failed to start currency provider tracker error="json: cannot unmarshal object into Go value of type []config.coinList"

Proposal


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@github-staff github-staff deleted a comment from louseee Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@zarazan and others