wooga / atlas-paket

Paket plugin for gradle
https://wooga.github.io/atlas-paket/
Apache License 2.0
0 stars 2 forks source link

Cache paket.bootstrapper.exe and paket.exe during integration tests #37

Closed Larusso closed 6 years ago

Larusso commented 6 years ago

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 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.

Changes

IMPROVE test stability by caching paket resources