currencyrate: propagate http errors to currencyrate rpc if a source is provided#9182
Conversation
b38af23 to
ee1dae8
Compare
|
I believe this level of mocking would fit a Unit Test better than an Integration Test. This error helps us tell, like you said:
Wouldn't it be better to catch and propagate the error back to the test? This way we would know it's a |
ee1dae8 to
e0dfd18
Compare
|
I've reworked the PR to propagate http errors and replaced the mocked tests with unit tests. The integration tests now only error on errors that are not http errors. |
7fee023 to
a7d62ea
Compare
|
|
So cln-currencyrate always uses all sources since almost all commands are interested in them except for |
a7d62ea to
25ee534
Compare
a9f9e1a to
40fe657
Compare
nGoline
left a comment
There was a problem hiding this comment.
That looks good, just a few comments...
40fe657 to
6ef3620
Compare
…s provided specifically coindesk was constantly hitting API rate limits causing our tests to fail so lets unit tests all endpoints with a snapshot of real responses and only allow for http error 401/429 in integration tests Also fix a flake in test_bkpr_currencyrate_persisted that would pick up a cached rate from CLN's own caching Changelog-None
6ef3620 to
b960a6a
Compare
|
Ugh now coindesk responded with |
specifically coindesk was constantly hitting API rate limits causing our tests to fail
so lets unit tests all endpoints with a snapshot of real responses and only allow for http
error 429 in integration tests
Also fix a flake in test_bkpr_currencyrate_persisted that would pick up a cached rate from CLN's own caching