summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-06-04 16:57:12 -0700
committerTim Smith <tsmith84@gmail.com>2020-06-04 17:08:09 -0700
commita658e6a0247dbd5207d37c0316247f4a1a890e42 (patch)
tree75e9fa154560d1c936df3a09b1af4dc52170bd06
parentc2877c9ae328062e5a803b4272a44a1ce9ee8e83 (diff)
downloadchef-a658e6a0247dbd5207d37c0316247f4a1a890e42.tar.gz
Add a kitchen test for zypper_repository
Setup the nginx repo Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/_zypper.rb13
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/linux.rb1
2 files changed, 14 insertions, 0 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_zypper.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_zypper.rb
new file mode 100644
index 0000000000..ecd833c863
--- /dev/null
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/_zypper.rb
@@ -0,0 +1,13 @@
+#
+# Cookbook:: end_to_end
+# Recipe:: _zypper
+#
+# Copyright:: Copyright (c) Chef Software Inc.
+#
+
+zypper_repository "nginx repo" do
+ baseurl "https://nginx.org/packages/sles/12"
+ gpgkey "https://nginx.org/keys/nginx_signing.key"
+end
+
+zypper_package 'nginx'
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb
index b66edb14dd..f2ea241a14 100644
--- a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb
@@ -108,6 +108,7 @@ locale "set system locale" do
end
include_recipe "::_apt" if platform_family?("debian")
+include_recipe "::_zypper" if suse?
include_recipe "::_chef-vault" unless includes_recipe?("end_to_end::chef-vault")
include_recipe "::_sudo"
include_recipe "::_sysctl"