summaryrefslogtreecommitdiff
path: root/kitchen-tests/kitchen.yml
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-04-22 10:34:43 -0700
committerTim Smith <tsmith@chef.io>2019-04-22 10:34:43 -0700
commit1b7cf9dda96f876cac199a499597d27919a6aded (patch)
tree349c67c7da6e6c20f2abad2a09660c928a9cfd3e /kitchen-tests/kitchen.yml
parent96e71f2d2fc0b84cd06a77a89f88dc236add430a (diff)
downloadchef-1b7cf9dda96f876cac199a499597d27919a6aded.tar.gz
Merge the local and travis kitchen tests into a single config
Make sure people are doing their local testing the same way it will run in Travis. The local testing didn't actually work before so this is a pretty solid win. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'kitchen-tests/kitchen.yml')
-rw-r--r--kitchen-tests/kitchen.yml127
1 files changed, 101 insertions, 26 deletions
diff --git a/kitchen-tests/kitchen.yml b/kitchen-tests/kitchen.yml
index 1cda8e1b64..5723e13ffd 100644
--- a/kitchen-tests/kitchen.yml
+++ b/kitchen-tests/kitchen.yml
@@ -1,40 +1,115 @@
---
driver:
- name: vagrant
- customize:
- cpus: 4
- memory: 2048
+ name: dokken
+ privileged: true
+ chef_image: chef/chef
+ chef_version: current
-verifier:
- name: inspec
- format: progress
+transport:
+ name: dokken
provisioner:
- name: chef_github
- chef_omnibus_url: "https://omnitruck.chef.io/install.sh"
- chef_omnibus_install_options: "-c current"
- github_owner: "chef"
- github_repo: "chef"
- ohai_refname: "master"
- refname: <%= %x(git rev-parse HEAD) %>
+ name: dokken
client_rb:
diff_disabled: true
+lifecycle:
+ pre_converge:
+ - remote: /opt/chef/embedded/bin/gem install appbundle-updater
+ - remote: /opt/chef/embedded/bin/appbundle-updater chef ohai <%= File.readlines('../Gemfile.lock', File.expand_path(File.dirname(__FILE__))).find { |l| l =~ /^\s+ohai \((\d+\.\d+\.\d+)\)/ }; 'v' + $1 %> --tarball --github chef/ohai
+ - remote: /opt/chef/embedded/bin/appbundle-updater chef chef <%= ENV['TRAVIS_COMMIT'] %> --tarball --github chef/chef
+
+verifier:
+ name: inspec
+ format: progress
+
platforms:
- - name: amazonlinux
- driver_config:
- box: mvbcoding/awslinux
- - name: amazonlinux-2
- - name: centos-6
- - name: centos-7
- - name: debian-8
- - name: debian-9
- - name: opensuse-leap-42
- - name: ubuntu-16.04
- - name: ubuntu-18.04
+- name: amazonlinux
+ driver:
+ image: dokken/amazonlinux
+ pid_one_command: /sbin/init
+ intermediate_instructions:
+ - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
+
+- name: amazonlinux-2
+ driver:
+ image: dokken/amazonlinux-2
+ pid_one_command: /usr/lib/systemd/systemd
+ intermediate_instructions:
+ - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
+
+- name: debian-8
+ driver:
+ image: dokken/debian-8
+ pid_one_command: /bin/systemd
+ intermediate_instructions:
+ - RUN /usr/bin/apt-get update
+
+- name: debian-9
+ driver:
+ image: dokken/debian-9
+ pid_one_command: /bin/systemd
+ intermediate_instructions:
+ - RUN /usr/bin/apt-get update
+
+- name: debian-10
+ driver:
+ image: dokken/debian-10
+ pid_one_command: /bin/systemd
+ intermediate_instructions:
+ - RUN /usr/bin/apt-get update
+
+- name: centos-6
+ driver:
+ image: dokken/centos-6
+ pid_one_command: /sbin/init
+ intermediate_instructions:
+ - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
+
+- name: centos-7
+ driver:
+ image: dokken/centos-7
+ pid_one_command: /usr/lib/systemd/systemd
+ intermediate_instructions:
+ - RUN yum -y install e2fsprogs
+ - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
+
+- name: fedora-latest
+ driver:
+ image: dokken/fedora-latest
+ pid_one_command: /usr/lib/systemd/systemd
+ intermediate_instructions:
+ - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
+
+- name: ubuntu-16.04
+ driver:
+ image: dokken/ubuntu-16.04
+ pid_one_command: /bin/systemd
+ intermediate_instructions:
+ - RUN /usr/bin/apt-get update
+
+- name: ubuntu-18.04
+ driver:
+ image: dokken/ubuntu-18.04
+ pid_one_command: /bin/systemd
+ intermediate_instructions:
+ - RUN /usr/bin/apt-get update
+
+- name: opensuse-leap
+ driver:
+ image: dokken/opensuse-leap
+ pid_one_command: /bin/systemd
+ intermediate_instructions:
+ - RUN /usr/bin/zypper --non-interactive update
+ - RUN /usr/bin/zypper --non-interactive install cron
suites:
- name: end-to-end
run_list:
- recipe[end_to_end::default]
- - recipe[end_to_end::tests]
+ - name: rspec
+ run_list:
+ - recipe[rspec]
+ lifecycle:
+ post_converge:
+ - remote: /usr/local/bin/run-chef-rspec