Fix (#167) romania deviating files once in a while#168
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #168 +/- ##
==========================================
- Coverage 93.16% 91.66% -1.50%
==========================================
Files 24 25 +1
Lines 1814 1896 +82
==========================================
+ Hits 1690 1738 +48
- Misses 124 158 +34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
As far as i know it is not predictable when files with these names are produced therefore there is no test |
PietrH
left a comment
There was a problem hiding this comment.
I think you could test this via mocking: https://testthat.r-lib.org/reference/local_mocked_bindings.html
You'd then locally redefine read_pvol_from_url_per_param to return a httr2_http_404 condition on your test query default url, but a value you can test for (TRUE or a string, or whatever) on the modified, expected new url.
I'm not sure you should. But you could.
Otherwise, looks good. I'd maybe rename the second urls object to a different symbol so I could compare the two more easily when debugging. But that's only a very minor nitpick.
Nice fix! Shame there isn't a more descriptive server response other than the 404! What would happen if the second url also returns a 404?
Might be nice in the future
It will just return a 404. which most likely means the server is down |
|
@PietrH if you approve I can merge ;) |
For the rare cases the urls is 0300 we use the alternative format