-
Notifications
You must be signed in to change notification settings - Fork 13
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
Complete candidate route test suite #211
Conversation
… type, liquidity and volume
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Next we will work on how to integrate it into our stage/prod deployment process. Thank you!
tests/test_candidate_routes.py
Outdated
|
||
from sqs_service import * | ||
import constants | ||
from conftest import SERVICE_MAP | ||
|
||
SQS_STAGE = "https://sqs.stage.osmosis.zone" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SQS_STAGE and ROUTES_URL also exist in sqs_service.py. Shall we not duplicate them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch - I think we will need to add a Python linter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, I mislinked 😅 - this one: #220
Addressed comments, thanks @cryptomatictrader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
* e2e test: foundation for getting desired testing tokens based on pool type, liquidity and volume * make astroport and transmuter helpers more useful * clean up * clean up * clean up * clean up pool types * clean up precomputed mappings * clean up token choice * liq filtering with pool types and more clean up * space * e2e: test for /tokens/metadata and router/routes * fetch expected number of routes from config * more candidate route tests * Candidate routes test between every token and USDC * complete candidate route test suite * prevent false positives * comment * remove main.py * remove obsolete constants & avoid hardcoding (cherry picked from commit f5f5831)
* e2e test: foundation for getting desired testing tokens based on pool type, liquidity and volume * make astroport and transmuter helpers more useful * clean up * clean up * clean up * clean up pool types * clean up precomputed mappings * clean up token choice * liq filtering with pool types and more clean up * space * e2e: test for /tokens/metadata and router/routes * fetch expected number of routes from config * more candidate route tests * Candidate routes test between every token and USDC * complete candidate route test suite * prevent false positives * comment * remove main.py * remove obsolete constants & avoid hardcoding (cherry picked from commit f5f5831) Co-authored-by: Roman <[email protected]>
* fix: pools with low liquidity being included in routes (#191) * fix: pools with low liquidity being included in routes * fix: linting issues for pricing route code * chore: update error messages * fix: remove using the cache for the pricing query * chore: add v25.x backport tag to mergify github action (#189) * fix: increase min liquidity for routing through pools (#193) * chore: update astroport code ID (#195) * feat: /config-private endpoint, mask otel in /config endpoint (#202) * feat: /config-private endpoint, mask otel in /config endpoint * lint * Update system/delivery/http/system_http_handler.go * docs: remove outdated context about ingest (#200) * docs: remove outdated context about ingest * updates * update config code ID for astroport PCL (#199) * changelog update (#206) * e2e test: foundation for getting desired testing tokens based on pool type, liquidity and volume (#198) * e2e test: foundation for getting desired testing tokens based on pool type, liquidity and volume * make astroport and transmuter helpers more useful * clean up * clean up * clean up * clean up pool types * clean up precomputed mappings * clean up token choice * liq filtering with pool types and more clean up * space * STABI-128 - Support Coingecko Prices * fix: DYDX spot price bug (#212) * changelog & sqsdomain * go mod fix * e2e: test for /tokens/metadata and router/routes (#207) * e2e test: foundation for getting desired testing tokens based on pool type, liquidity and volume * make astroport and transmuter helpers more useful * clean up * clean up * clean up * clean up pool types * clean up precomputed mappings * clean up token choice * liq filtering with pool types and more clean up * space * e2e: test for /tokens/metadata and router/routes * fetch expected number of routes from config * Changes based on code review, except the test related changes which will be checked in later * POC: Flight recording of slow requests (above 500ms) * Revert "POC: Flight recording of slow requests (above 500ms)" This reverts commit a7e9cef. * Added coingecko url and quote currency to default sqs config and test suite config * Updated tokens.json with coingecko_id in it * Added test cases to verify existence of coingecko_id in asset list, and verify the function of coingecko pricing source * Added test case to print chain denom in mainnet without coingecko support (no coingecko id in asset list) * Reuse the original tokens.json but update it with coingecko id so that it won't break test cases * Updated unsupported token count after adding coingeckto as fallback support * Verify unsupported token count for coingecko pricing source * Added the job for checking coingecko unsupported token list * Clean up chain pricing; add quote-based and spot-price based tests; add docs (#214) * Clean up chain pricing; add quote-based and spot-price based tests; add docs * updates * comments * changelog * Update tokens/delivery/http/tokens_delivery.go Added comment to explain how pricingSource parameter value will be interpreted. Co-authored-by: Roman <[email protected]> * Update tokens/usecase/pricing/coingecko/pricing_coingecko_test.go Removed unused function Co-authored-by: Roman <[email protected]> * Revision based on the comments from code review * Fixed lint commplaint * Complete candidate route test suite (#211) * e2e test: foundation for getting desired testing tokens based on pool type, liquidity and volume * make astroport and transmuter helpers more useful * clean up * clean up * clean up * clean up pool types * clean up precomputed mappings * clean up token choice * liq filtering with pool types and more clean up * space * e2e: test for /tokens/metadata and router/routes * fetch expected number of routes from config * more candidate route tests * Candidate routes test between every token and USDC * complete candidate route test suite * prevent false positives * comment * remove main.py * remove obsolete constants & avoid hardcoding * Update README to include coingecko documentation * demo monkey patch pricing getter mock (#218) * Use a mock for mocking the coingecko operation * Return 0 if coingecko id is empty in mock coingecko getter fn * Update tokens/usecase/pricing/coingecko/pricing_coingecko.go Co-authored-by: Roman <[email protected]> * negligible improvement (#188) * negligible improvement * lint --------- Co-authored-by: Roman <[email protected]> * Some comments as I looked through this code (#171) Co-authored-by: Roman <[email protected]> * Added test cases for checking the input validations in GetPrices in coingecko pricing source * Fixed linter complaint * Removed unused param, enhanced test cases for prices * Revert get_tokens_metadata pointing to PROD after local testing * Make returned value in coingecko mock consistent with real coingecko getter implementation * Filled in the non-exist coingecko id for wbtc in tokens.json * wbtc coingecko id is available, so one less unsupported token count in the assertion test * Pricing working test should check for both nil or zero price --------- Co-authored-by: PaddyMc <[email protected]> Co-authored-by: Roman <[email protected]> Co-authored-by: Dev Ojha <[email protected]> Co-authored-by: Calvin <[email protected]>
Completes: https://linear.app/osmosis/issue/STABI-140/[sqs-automated-tests-in-ci][candidate-routes]
Add the following integration candidate route tests:
Runs these all in-parallel from 4 workers. There are 457 tests being run.
Testing