summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-12-04 16:16:35 -0800
committerGitHub <noreply@github.com>2017-12-04 16:16:35 -0800
commit9099174233cdb601ffafbab47ea855fe6c0b1cf0 (patch)
treeb60263b6bca9fbef421fec3c9a7c82974a7aba76
parent7300eca603788048f95d0641f1110f8dcc049820 (diff)
parent4832d8569efe7a9f1e0c4cd4661c4305deb7e8b7 (diff)
downloadchef-9099174233cdb601ffafbab47ea855fe6c0b1cf0.tar.gz
Merge pull request #6614 from chef/opensuse_testing
Add openSUSE testing in Travis & expand cookbooks we test
-rw-r--r--.travis.yml18
-rw-r--r--kitchen-tests/.kitchen.travis.yml4
-rw-r--r--kitchen-tests/.kitchen.yml2
-rw-r--r--kitchen-tests/Berksfile.lock6
-rw-r--r--kitchen-tests/cookbooks/base/attributes/default.rb1
-rw-r--r--kitchen-tests/cookbooks/base/metadata.rb2
-rw-r--r--kitchen-tests/cookbooks/base/recipes/default.rb11
-rw-r--r--kitchen-tests/cookbooks/base/recipes/packages.rb2
8 files changed, 41 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
index a28873d849..b82c9df10e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -253,6 +253,24 @@ matrix:
env:
- FEDORA=latest
- KITCHEN_YAML=.kitchen.travis.yml
+ - rvm: 2.4.2
+ services: docker
+ sudo: required
+ gemfile: kitchen-tests/Gemfile
+ before_install:
+ - gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2)
+ - gem install bundler -v $(grep bundler omnibus_overrides.rb | cut -d'"' -f2)
+ bundler_args: --without ci docgen guard integration maintenance omnibus_package --frozen
+ before_script:
+ - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
+ - cd kitchen-tests
+ script:
+ - bundle exec kitchen test base-opensuse-leap
+ after_failure:
+ - cat .kitchen/logs/kitchen.log
+ env:
+ - OPENSUSELEAP=42
+ - KITCHEN_YAML=.kitchen.travis.yml
# - rvm: 2.4.2
# services: docker
# sudo: required
diff --git a/kitchen-tests/.kitchen.travis.yml b/kitchen-tests/.kitchen.travis.yml
index b8b4e4737b..a03aa68341 100644
--- a/kitchen-tests/.kitchen.travis.yml
+++ b/kitchen-tests/.kitchen.travis.yml
@@ -106,14 +106,18 @@ platforms:
driver:
image: dokken/opensuse-leap
pid_one_command: /bin/systemd
+ intermediate_instructions:
+ - RUN /usr/bin/zypper install -y sudo
suites:
- name: base
run_list:
- recipe[base::default]
- name: awesome_customers_ubuntu
+ includes: [ubuntu-14.04, ubuntu-16.04]
run_list:
- recipe[awesome_customers_ubuntu_wrapper::default]
- name: awesome_customers_rhel
+ includes: [centos-6, centos-7]
run_list:
- recipe[awesome_customers_rhel_wrapper::default]
diff --git a/kitchen-tests/.kitchen.yml b/kitchen-tests/.kitchen.yml
index 080cad85a9..bf5b59fdcd 100644
--- a/kitchen-tests/.kitchen.yml
+++ b/kitchen-tests/.kitchen.yml
@@ -38,8 +38,10 @@ suites:
run_list:
- recipe[base::default]
- name: awesome_customers_ubuntu
+ includes: [ubuntu-14.04, ubuntu-16.04]
run_list:
- recipe[awesome_customers_ubuntu_wrapper::default]
- name: awesome_customers_rhel
+ includes: [centos-6, centos-7]
run_list:
- recipe[awesome_customers_rhel_wrapper::default]
diff --git a/kitchen-tests/Berksfile.lock b/kitchen-tests/Berksfile.lock
index 0f41f7bf5e..a59de006ed 100644
--- a/kitchen-tests/Berksfile.lock
+++ b/kitchen-tests/Berksfile.lock
@@ -9,6 +9,8 @@ GRAPH
build-essential (>= 0.0.0)
chef-client (>= 0.0.0)
chef_hostname (>= 0.0.0)
+ cron (>= 0.0.0)
+ git (>= 0.0.0)
logrotate (>= 0.0.0)
multipackage (>= 0.0.0)
nscd (>= 0.0.0)
@@ -29,6 +31,10 @@ GRAPH
chef_hostname (0.6.1)
compat_resource (12.19.0)
cron (5.0.1)
+ git (8.0.0)
+ build-essential (>= 0.0.0)
+ homebrew (>= 0.0.0)
+ homebrew (4.2.0)
iptables (4.3.1)
logrotate (2.2.0)
mingw (2.0.1)
diff --git a/kitchen-tests/cookbooks/base/attributes/default.rb b/kitchen-tests/cookbooks/base/attributes/default.rb
index e22dfa9fae..84cada26ae 100644
--- a/kitchen-tests/cookbooks/base/attributes/default.rb
+++ b/kitchen-tests/cookbooks/base/attributes/default.rb
@@ -74,6 +74,7 @@ default["resolver"]["search"] = "chef.io"
#
default["authorization"]["sudo"]["passwordless"] = true
+default["authorization"]["sudo"]["groups"] = %w{sysadmin}
default["authorization"]["sudo"]["users"] = %w{vagrant centos ubuntu}
#
diff --git a/kitchen-tests/cookbooks/base/metadata.rb b/kitchen-tests/cookbooks/base/metadata.rb
index 9a85a0e24b..9ad79ec0aa 100644
--- a/kitchen-tests/cookbooks/base/metadata.rb
+++ b/kitchen-tests/cookbooks/base/metadata.rb
@@ -22,6 +22,8 @@ depends "selinux"
depends "sudo"
depends "ubuntu"
depends "users"
+depends "cron"
+depends "git"
supports "ubuntu"
supports "debian"
diff --git a/kitchen-tests/cookbooks/base/recipes/default.rb b/kitchen-tests/cookbooks/base/recipes/default.rb
index bc98981d5d..e8b231b162 100644
--- a/kitchen-tests/cookbooks/base/recipes/default.rb
+++ b/kitchen-tests/cookbooks/base/recipes/default.rb
@@ -7,10 +7,9 @@
hostname "chef-travis-ci.chef.io"
-if platform_family?("debian")
- include_recipe "ubuntu"
- apt_update
-end
+apt_update
+
+include_recipe "ubuntu" if platform?("ubuntu")
if platform_family?("rhel", "fedora", "amazon")
include_recipe "selinux::disabled"
@@ -54,4 +53,8 @@ include_recipe "nscd"
include_recipe "logrotate"
+include_recipe "cron"
+
+include_recipe "git"
+
include_recipe "::tests"
diff --git a/kitchen-tests/cookbooks/base/recipes/packages.rb b/kitchen-tests/cookbooks/base/recipes/packages.rb
index a448936acd..fc65a2d8f7 100644
--- a/kitchen-tests/cookbooks/base/recipes/packages.rb
+++ b/kitchen-tests/cookbooks/base/recipes/packages.rb
@@ -7,7 +7,7 @@
# this is just a list of package that exist on every O/S we test, and often aren't installed by default. you don't
# have to get too clever here, you can delete packages if they don't exist everywhere we test.
-pkgs = %w{lsof tcpdump strace zsh dmidecode ltrace bc curl wget telnet subversion git traceroute htop tmux }
+pkgs = %w{lsof tcpdump strace zsh dmidecode ltrace bc curl wget subversion traceroute htop tmux }
# this deliberately calls the multipackage API N times in order to do one package installation in order to exercise the
# multipackage cookbook.