We constantly hit a rate limit when running the integration tests for this gradle plugin. I don't want to bundle Paket resources with this plugin and also no special test setup or logic execute during the tests. This is why I implemented a cache for each test spec. We run roughly 110 test features and each time we download the paket resources. The new test logic hooks itself into the cleanup method for each spec and copies the generated .paket folder to a temp directory. Another hook in setup phase will check if the paket resources are available in this temp folder and copy it before execution. This means no code duplication for downloading the resources and no adjustments to the base plugin code. If for whatever reason the cache directory is empty the test code will download the resources anyway.
There is one set of tests that need a clean test setup. For these tests I added a helper function to delete the resources.
Description
We constantly hit a rate limit when running the integration tests for this gradle plugin. I don't want to bundle Paket resources with this plugin and also no special test setup or logic execute during the tests. This is why I implemented a cache for each test spec. We run roughly 110 test features and each time we download the paket resources. The new test logic hooks itself into the
cleanup
method for each spec and copies the generated.paket
folder to a temp directory. Another hook insetup
phase will check if the paket resources are available in this temp folder and copy it before execution. This means no code duplication for downloading the resources and no adjustments to the base plugin code. If for whatever reason the cache directory is empty the test code will download the resources anyway.There is one set of tests that need a clean test setup. For these tests I added a helper function to delete the resources.
Changes
test stability by caching paket resources