Hello fellow Cockpit developers,
Cockpit's test machinery currently supports an environment variable `$TEST_DATA` which on the developer side is commonly used to put downloaded VM images into a specific path. If you don't specify it (nor the cockpit.bots.images-data-dir git config variable), then images are put into the project checkout, which is impractical:
1) development often requires `git clean -fdx` and such, which would kill your downloaded images 2) developers often have multiple checkouts, which don't share downloaded images
$TEST_DATA was also used by our CI, which also is problematic as it was being used by far more than downloaded images. As this cannot be salvaged cleanly, I sent
https://github.com/cockpit-project/bots/pull/943
to eliminate it completely. Once this lands, you have to do some actions on your machine to adjust, to avoid having to re-download the images:
If you don't use $TEST_DATA, nor set the git config:
Create ~/.cache/cockpit-images/, and move your images from bots/images/*.qcow2 to there
If you set `$TEST_DATA`:
Create ~/.cache/cockpit-images/, and move your images from $TEST_DATA/images/*.qcow2 to there. Afterwards, clean up the other stuff, as that is not needed: `rm -r `$TEST_DATA`. Edit your ~/.bashrc (or wherever) to undefine it.
If you set cockpit.bots.images-data-dir:
No action necessary, this continues to override the ~/.cache/cockpit-images default. However, you may still want to move images to the standard directory and eliminate the git config setting for simplicity.
After that, cockpit testing DTRT by default: Downloaded images go to ~/.cache/cockpit-images/ and are shared between checkouts, and truly temporary files (overlays, locks, etc.) go to tmp/ or ./tmp/, and the github cache goes to ~/.cache/github/.
Please let me know if you have questions or concerns -- ideally, follow up on the pull request, but discussing it here is also fine, of course.
Thanks!
Martin
cockpit-devel@lists.fedorahosted.org