coderanger / kitchen-sync

Test Kitchen transport plugin to speed up tests.
Apache License 2.0
81 stars 24 forks source link

kitchen-sync destroys files dropped by cookbooks to Chef::Config[:file_cache_path] #3

Closed rhass-r7 closed 8 years ago

rhass-r7 commented 9 years ago

I observed an odd behavior in which a remote_file call in a cookbook I was developing, was constantly redownloading the file despite having a valid checksum defined in the call to the resource. On a hunch, I disabled kitchen-sync and ran kitchen converge once more, and discovered the file did not redownload.

I am not sure what the best way to handle this is, as I suspect kitchen-sync should in most cases clear our the Chef::Config[:file_cache_path] contents... the only idea I have at the moment is to have a white-list of files, but that seems somewhat kludgy and can be problematic to maintain.

obazoud commented 9 years ago

To avoid this kind of behaviour, pre install rsync.

coderanger commented 9 years ago

Hmm, unless your file cache path is being updated by kitchen that seems odd. Generally kitchen only transfers stuff under /tmp/kitchen.

coderanger commented 8 years ago

Closing this out as not reproducible.

lcosmes commented 8 years ago

This can be reproduced when using kitchen-sync, the Jira community cookbook (https://supermarket.chef.io/cookbooks/jira / v2.7.0 or later), the ark community cookbook (https://github.com/burtlo/ark/ / v0.8.2 or later). You can run the Jira install with all default attributes, except for default['jira']['install_type'] = 'standalone' The Jira tarball gets downloaded every time you run test kitchen as the contents of /tmp/kitchen/cache get wiped out.

coderanger commented 8 years ago

@lcosmes Which transport are you using?

lcosmes commented 8 years ago

@coderanger : transport: name: sftp

Let me know if you need more info.

coderanger commented 8 years ago

@lcosmes Try out the version I just pushed to master, should be better.

lcosmes commented 8 years ago

@coderanger I tested your latest changes using sftp transport and the contents of the cache directory were not removed this time around! Thanks for the quick fix as this plugin really speeds up development.