diff options
author | Tim Smith <tsmith@chef.io> | 2019-04-15 10:37:37 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2019-04-15 10:37:37 -0700 |
commit | ae43342056c65422df4f350dc9c389c5bd5d166d (patch) | |
tree | b772e3d803fb8cdacd641c5aa77c71abfebb709d /kitchen-tests | |
parent | 0d047b3c52d2960890b3c5342a22bdf45e971cfa (diff) | |
download | chef-ae43342056c65422df4f350dc9c389c5bd5d166d.tar.gz |
Add archive testing
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'kitchen-tests')
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/files/tourism.tar.gz | bin | 0 -> 2253 bytes | |||
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/files/tourism.tar.xz | bin | 0 -> 2128 bytes | |||
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/files/tourism.zip | bin | 0 -> 2680 bytes | |||
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/recipes/default.rb | 12 |
4 files changed, 12 insertions, 0 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/files/tourism.tar.gz b/kitchen-tests/cookbooks/end_to_end/files/tourism.tar.gz Binary files differnew file mode 100644 index 0000000000..a03da304d3 --- /dev/null +++ b/kitchen-tests/cookbooks/end_to_end/files/tourism.tar.gz diff --git a/kitchen-tests/cookbooks/end_to_end/files/tourism.tar.xz b/kitchen-tests/cookbooks/end_to_end/files/tourism.tar.xz Binary files differnew file mode 100644 index 0000000000..de37cea21e --- /dev/null +++ b/kitchen-tests/cookbooks/end_to_end/files/tourism.tar.xz diff --git a/kitchen-tests/cookbooks/end_to_end/files/tourism.zip b/kitchen-tests/cookbooks/end_to_end/files/tourism.zip Binary files differnew file mode 100644 index 0000000000..8c578e691d --- /dev/null +++ b/kitchen-tests/cookbooks/end_to_end/files/tourism.zip diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/default.rb b/kitchen-tests/cookbooks/end_to_end/recipes/default.rb index 2779ed92fc..bf132bf6b0 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/default.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/default.rb @@ -95,4 +95,16 @@ openssl_rsa_public_key "/etc/ssl/rsakey_aes128cbc.pub" do action :create end +# test various archive formats in the archive_file resource +%w(tourism.tar.gz tourism.tar.xz tourism.zip).each do |archive| + cookbook_file File.join(Chef::Config[:file_cache_path], archive) do + source archive + end + + archive_file archive do + path File.join(Chef::Config[:file_cache_path], archive) + extract_to File.join(Chef::Config[:file_cache_path], archive.gsub('.', '_')) + end +end + include_recipe "::tests" |