Skip to content

tests: mock all currencyrate endpoints#9182

Open
daywalker90 wants to merge 1 commit into
ElementsProject:masterfrom
daywalker90:currencyrate-mock-liveapis
Open

tests: mock all currencyrate endpoints#9182
daywalker90 wants to merge 1 commit into
ElementsProject:masterfrom
daywalker90:currencyrate-mock-liveapis

Conversation

@daywalker90
Copy link
Copy Markdown
Collaborator

specifically coingecko was constantly hitting API rate limits causing our tests to fail so lets mock all endpoints with a snapshot of real responses

If the actual API's change, break, or vanish we have to notice it in a different way

specifically coingecko was constantly hitting API rate limits causing our tests to fail
so lets mock all endpoints with a snapshot of real responses

If the actual API's change, break, or vanish we have to notice it in a different way

Changelog-None
@daywalker90 daywalker90 force-pushed the currencyrate-mock-liveapis branch from b38af23 to ee1dae8 Compare June 1, 2026 10:08
@madelinevibes madelinevibes added this to the v26.09 milestone Jun 4, 2026
@madelinevibes madelinevibes added the Status::Ready for Review The work has been completed and is now awaiting evaluation or approval. label Jun 4, 2026
@madelinevibes madelinevibes requested a review from nGoline June 4, 2026 11:16
@nGoline
Copy link
Copy Markdown
Collaborator

nGoline commented Jun 5, 2026

I believe this level of mocking would fit a Unit Test better than an Integration Test. This error helps us tell, like you said:

If the actual API's change, break, or vanish...

Wouldn't it be better to catch and propagate the error back to the test? This way we would know it's a HTTP 429 Too Many Requests and safely disregard that one provider, whilst still testing the integration between all the moving parts for this test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status::Ready for Review The work has been completed and is now awaiting evaluation or approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants