summaryrefslogtreecommitdiff
path: root/kitchen-tests
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 /kitchen-tests
parentd96e7295860896d08b1ee943e83c7bb828053a63 (diff)
downloadchef-5f63ad8716e03a29a515aed8c138f41327638901.tar.gz
add a few more distros to kitchen testinglcg/kitchen-tests3
adds debian, centos-7 and fedora-23
Diffstat (limited to 'kitchen-tests')
-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
4 files changed, 14 insertions, 12 deletions
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] }