aloftdata / getRad

R package to access and standardize radar data
https://aloftdata.github.io/getRad/
Other
0 stars 0 forks source link

Use HTTP testing framework to cache/mock response objects in tests #14

Open PietrH opened 1 week ago

PietrH commented 1 week ago

Currently the tests require 100MB+ of internet traffic to run, I suspect this number will only grow as we add more data sources. Not only are we already running into failed tests because of timeouts or server side failures from time to time, this IO also slows down the tests, increases costs for data hosting (aloft bucket, and increases the environmental impact of this package (via CI).

I propose we investigate the packages from the HTTP testing handbook; https://books.ropensci.org/http-testing/pkgs-comparison.html and see if any are suitable.

The fact that the objects we test on are so big might be an issue, but as a counterpoint, we might not actually need to test on complete real world data objects, but might get away with subsets which we mock/cache.

I've used vcr before, but only for much smaller objects.