summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-05-25 10:18:40 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-05-25 10:18:40 -0700
commit5f63ad8716e03a29a515aed8c138f41327638901 (patch)
tree7c2de05d913216189b69361bc64ef84f098e96ea
parentd96e7295860896d08b1ee943e83c7bb828053a63 (diff)
downloadchef-lcg/kitchen-tests3.tar.gz
add a few more distros to kitchen testinglcg/kitchen-tests3
adds debian, centos-7 and fedora-23
-rw-r--r--.travis.yml75
-rw-r--r--kitchen-tests/.kitchen.travis.yml7
-rw-r--r--kitchen-tests/cookbooks/base/attributes/default.rb2
-rw-r--r--kitchen-tests/cookbooks/base/recipes/default.rb10
-rw-r--r--kitchen-tests/test/integration/webapp/default_spec.rb7
5 files changed, 85 insertions, 16 deletions
diff --git a/.travis.yml b/.travis.yml
index dc2e89553a..2d73a98575 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -110,7 +110,6 @@ matrix:
TEST_GEM: poise
script: tasks/bin/run_external_test $TEST_GEM rake spec
rvm: 2.2
- #
### START TEST KITCHEN ONLY ###
#
- rvm: 2.2
@@ -128,7 +127,7 @@ matrix:
after_failure:
- cat .kitchen/logs/kitchen.log
env:
- - UBUNTU=1204
+ - UBUNTU=12.04
- KITCHEN_YAML=.kitchen.travis.yml
- rvm: 2.2
services: docker
@@ -145,7 +144,7 @@ matrix:
after_failure:
- cat .kitchen/logs/kitchen.log
env:
- - UBUNTU=1404
+ - UBUNTU=14.04
- KITCHEN_YAML=.kitchen.travis.yml
- rvm: 2.2
services: docker
@@ -162,7 +161,41 @@ matrix:
after_failure:
- cat .kitchen/logs/kitchen.log
env:
- - UBUNTU=1604
+ - UBUNTU=16.04
+ - KITCHEN_YAML=.kitchen.travis.yml
+ - rvm: 2.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)
+ before_script:
+ - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
+ - cd kitchen-tests
+ script:
+ - bundle exec kitchen test debian-7
+ after_failure:
+ - cat .kitchen/logs/kitchen.log
+ env:
+ - DEBIAN=7
+ - KITCHEN_YAML=.kitchen.travis.yml
+ - rvm: 2.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)
+ before_script:
+ - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
+ - cd kitchen-tests
+ script:
+ - bundle exec kitchen test debian-8
+ after_failure:
+ - cat .kitchen/logs/kitchen.log
+ env:
+ - DEBIAN=8
- KITCHEN_YAML=.kitchen.travis.yml
- rvm: 2.2
services: docker
@@ -181,6 +214,40 @@ matrix:
env:
- CENTOS=6
- KITCHEN_YAML=.kitchen.travis.yml
+ - rvm: 2.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)
+ before_script:
+ - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
+ - cd kitchen-tests
+ script:
+ - bundle exec kitchen test centos-7
+ after_failure:
+ - cat .kitchen/logs/kitchen.log
+ env:
+ - CENTOS=7
+ - KITCHEN_YAML=.kitchen.travis.yml
+ - rvm: 2.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)
+ before_script:
+ - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
+ - cd kitchen-tests
+ script:
+ - bundle exec kitchen test fedora-23
+ after_failure:
+ - cat .kitchen/logs/kitchen.log
+ env:
+ - FEDORA=23
+ - KITCHEN_YAML=.kitchen.travis.yml
### END TEST KITCHEN ONLY ###
- rvm: 2.2
sudo: required
diff --git a/kitchen-tests/.kitchen.travis.yml b/kitchen-tests/.kitchen.travis.yml
index 9946935917..8bc41adb00 100644
--- a/kitchen-tests/.kitchen.travis.yml
+++ b/kitchen-tests/.kitchen.travis.yml
@@ -33,6 +33,7 @@ platforms:
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get -y install zlib1g-dev sudo net-tools
+ - RUN /bin/mkdir /var/run/sshd
- name: debian-8
driver:
@@ -50,6 +51,7 @@ platforms:
intermediate_instructions:
- RUN yum clean all
- RUN yum install -y which initscripts net-tools sudo
+ - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
- name: centos-6
driver:
@@ -58,6 +60,7 @@ platforms:
intermediate_instructions:
- RUN yum clean all
- RUN yum -y install which initscripts net-tools sudo
+ - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
- name: centos-7
driver:
@@ -66,13 +69,15 @@ platforms:
intermediate_instructions:
- RUN yum clean all
- RUN yum -y install which initscripts net-tools sudo
+ - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
- name: fedora-23
driver:
image: fedora:23
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- - RUN dnf -y install yum which initscripts net-tools
+ - RUN dnf -y install yum which initscripts net-tools sudo
+ - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
- name: ubuntu-12.04
driver:
diff --git a/kitchen-tests/cookbooks/base/attributes/default.rb b/kitchen-tests/cookbooks/base/attributes/default.rb
index f3bcb4f21a..ef273c969c 100644
--- a/kitchen-tests/cookbooks/base/attributes/default.rb
+++ b/kitchen-tests/cookbooks/base/attributes/default.rb
@@ -5,8 +5,6 @@ puts "CHEF SUGAR THINKS WE ARE ON RHEL" if rhel?
# ubuntu cookbook overrides
#
-default["ubuntu"]["archive_url"] = "http://us-west-2.ec2.archive.ubuntu.com/ubuntu"
-default["ubuntu"]["security_url"] = "http://us-west-2.ec2.archive.ubuntu.com/ubuntu"
default["ubuntu"]["include_source_packages"] = true
default["ubuntu"]["components"] = "main restricted universe multiverse"
diff --git a/kitchen-tests/cookbooks/base/recipes/default.rb b/kitchen-tests/cookbooks/base/recipes/default.rb
index be939b78e6..053a689b27 100644
--- a/kitchen-tests/cookbooks/base/recipes/default.rb
+++ b/kitchen-tests/cookbooks/base/recipes/default.rb
@@ -7,13 +7,16 @@
hostname "chef-travis-ci.chef.io"
-if node[:platform_family] == "debian"
+if node["platform_family"] == "debian"
include_recipe "ubuntu"
apt_update "packages"
end
-if %w{rhel fedora}.include?(node[:platform_family])
+if %w{rhel fedora}.include?(node["platform_family"])
include_recipe "selinux::disabled"
+end
+
+if node["platform_family"] == "rhel"
include_recipe "yum-epel"
end
@@ -33,6 +36,9 @@ include_recipe "chef-client::delete_validation"
include_recipe "chef-client::config"
include_recipe "chef-client"
+# hack needed for debian-7 on docker
+directory "/var/run/sshd"
+
include_recipe "openssh"
include_recipe "nscd"
diff --git a/kitchen-tests/test/integration/webapp/default_spec.rb b/kitchen-tests/test/integration/webapp/default_spec.rb
index fbd1e0e782..ec23a57998 100644
--- a/kitchen-tests/test/integration/webapp/default_spec.rb
+++ b/kitchen-tests/test/integration/webapp/default_spec.rb
@@ -97,13 +97,6 @@ end
end
end
-if %w{debian ubuntu}.include?(os[:family])
- describe apt("http://us-west-2.ec2.archive.ubuntu.com/ubuntu") do
- it { should be_enabled }
- it { should exist }
- end
-end
-
describe etc_group.where(group_name: "sysadmin") do
its("users") { should include "adam" }
its("gids") { should eq [2300] }