summaryrefslogtreecommitdiff
path: root/kitchen-tests
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-04-15 10:37:37 -0700
committerTim Smith <tsmith@chef.io>2019-04-15 10:37:37 -0700
commitae43342056c65422df4f350dc9c389c5bd5d166d (patch)
treeb772e3d803fb8cdacd641c5aa77c71abfebb709d /kitchen-tests
parent0d047b3c52d2960890b3c5342a22bdf45e971cfa (diff)
downloadchef-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.gzbin0 -> 2253 bytes
-rw-r--r--kitchen-tests/cookbooks/end_to_end/files/tourism.tar.xzbin0 -> 2128 bytes
-rw-r--r--kitchen-tests/cookbooks/end_to_end/files/tourism.zipbin0 -> 2680 bytes
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/default.rb12
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
new file mode 100644
index 0000000000..a03da304d3
--- /dev/null
+++ b/kitchen-tests/cookbooks/end_to_end/files/tourism.tar.gz
Binary files differ
diff --git a/kitchen-tests/cookbooks/end_to_end/files/tourism.tar.xz b/kitchen-tests/cookbooks/end_to_end/files/tourism.tar.xz
new file mode 100644
index 0000000000..de37cea21e
--- /dev/null
+++ b/kitchen-tests/cookbooks/end_to_end/files/tourism.tar.xz
Binary files differ
diff --git a/kitchen-tests/cookbooks/end_to_end/files/tourism.zip b/kitchen-tests/cookbooks/end_to_end/files/tourism.zip
new file mode 100644
index 0000000000..8c578e691d
--- /dev/null
+++ b/kitchen-tests/cookbooks/end_to_end/files/tourism.zip
Binary files differ
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"