summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2019-10-02 09:45:22 -0700
committerTim Smith <tsmith84@gmail.com>2019-10-02 09:45:22 -0700
commit7020508733a345f63b6e453cda867fbd6e525837 (patch)
tree32813e421939f51505ea398122ebf730279c1e2e
parent3357f4321feda1718c6e2893869e1d92ad823549 (diff)
downloadchef-7020508733a345f63b6e453cda867fbd6e525837.tar.gz
Update the end to end test config
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--kitchen-tests/Gemfile3
-rw-r--r--kitchen-tests/README.md12
-rw-r--r--kitchen-tests/kitchen.travis.yml108
-rw-r--r--kitchen-tests/kitchen.yml41
4 files changed, 44 insertions, 120 deletions
diff --git a/kitchen-tests/Gemfile b/kitchen-tests/Gemfile
index 002dcd3935..d7ab62910e 100644
--- a/kitchen-tests/Gemfile
+++ b/kitchen-tests/Gemfile
@@ -5,7 +5,6 @@ gem "chef", path: ".."
gem "ohai", git: "https://github.com/chef/ohai.git", branch: "14-stable" # avoids failures when we bump chef major
gem "berkshelf", git: "https://github.com/berkshelf/berkshelf.git", branch: "master"
gem "kitchen-dokken", "~> 2.0"
-gem "kitchen-docker", git: "https://github.com/test-kitchen/kitchen-docker.git", branch: "master"
gem "kitchen-inspec", git: "https://github.com/chef/kitchen-inspec.git", branch: "master"
-gem "kitchen-vagrant", git: "https://github.com/test-kitchen/kitchen-vagrant.git", branch: "master"
+gem "inspec"
gem "test-kitchen", git: "https://github.com/test-kitchen/test-kitchen.git", branch: "master"
diff --git a/kitchen-tests/README.md b/kitchen-tests/README.md
index 9bf20a8fab..99ab9b0cfe 100644
--- a/kitchen-tests/README.md
+++ b/kitchen-tests/README.md
@@ -1,10 +1,10 @@
-# End-To-End Testing for Chef Client
+# End-To-End Testing for Chef Infra Client
-Here we seek to provide end-to-end testing of Chef Client through cookbooks which exercise many of the available resources, providers, and common patterns. The cookbooks here are designed to ensure certain capabilities remain functional with updates to the client code base.
+Here we seek to provide end-to-end testing of Chef Infra Client through cookbooks which exercise many of the available resources, providers, and common patterns. The cookbooks here are designed to ensure certain capabilities remain functional with updates to the client code base.
## Getting started
-These tests run in Docker containers so make sure to install Docker on your workstation. Once docker is installed all the gems needed to run these tests can be installed with Bundler.
+These tests run in Docker containers, so make sure to install Docker on your workstation. Once Docker is installed, all the gems needed to run these tests can be installed with Bundler.
```shell
chef/kitchen-tests$ bundle install
@@ -25,7 +25,7 @@ end-to-end-amazonlinux Dokken Dokken Inspec Dokken <Not Created
## Testing
-We use Test Kitchen to build instances, test client code, and destroy instances. If you are unfamiliar with Test Kitchen we recommend checking out the [tutorial](http://kitchen.ci/) along with the `kitchen-dokken` [driver documentation](https://github.com/someara/kitchen-dokken). Test Kitchen is configured to manipulate instances using [Docker](https://www.docker.com/) when testing locally and when testing pull requests on [Travis CI](https://travis-ci.com/).
+We use Test Kitchen to build instances, test client code, and destroy instances. If you are unfamiliar with Test Kitchen, we recommend checking out the [tutorial](http://kitchen.ci/) along with the `kitchen-dokken` [driver documentation](https://github.com/someara/kitchen-dokken). Test Kitchen is configured to manipulate instances using [Docker](https://www.docker.com/) when testing locally, and when testing, pull requests on [Buildkite](https://buildkite.com/chef-oss/chef-chef-master-verify).
### Commands
@@ -53,7 +53,7 @@ To see a list of available commands, type `bundle exec kitchen help`. To see mor
### Configuring your tests
-Test Kitchen is configured in the `kitchen.yml` file which resides in this directory. You will need to configure the provisioner before running the tests.
+Test Kitchen is configured in the `kitchen.yml` file, which resides in this directory. You will need to configure the provisioner before running the tests.
The provisioner can be configured to pull client source code from a GitHub repository using any valid Git reference. You are encouraged to modify any of these settings, but please return them to their original values before submitting a pull request for review (unless, of course, your changes are enhancements to the default provisioner settings).
@@ -66,7 +66,7 @@ The branch you choose must be accessible on GitHub. You cannot use a local commi
### Testing pull requests
-These end-to-end tests are also configured to run on Travis-CI with docker containers when you submit a pull request to `chef/chef`. Kitchen is configured to pull chef client source code from the branch it is testing. There is no need to modify `kitchen.yml` unless you are contributing tests.
+These end-to-end tests are also configured to run on Buildkite with Docker containers when you submit a pull request to `chef/chef`. Kitchen is configured to pull chef client source code from the branch it is testing. There is no need to modify `kitchen.yml` unless you are contributing tests.
## Contributing
diff --git a/kitchen-tests/kitchen.travis.yml b/kitchen-tests/kitchen.travis.yml
deleted file mode 100644
index 64ff400887..0000000000
--- a/kitchen-tests/kitchen.travis.yml
+++ /dev/null
@@ -1,108 +0,0 @@
----
-driver:
- name: dokken
- privileged: true
- chef_image: chef/chef
- chef_version: current
-
-transport:
- name: dokken
-
-provisioner:
- 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:
- 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: 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]
- - name: rspec
- run_list:
- - recipe[rspec]
- lifecycle:
- post_converge:
- - remote: /usr/local/bin/run-chef-rspec
diff --git a/kitchen-tests/kitchen.yml b/kitchen-tests/kitchen.yml
index 3893f082bd..b94b3067ea 100644
--- a/kitchen-tests/kitchen.yml
+++ b/kitchen-tests/kitchen.yml
@@ -19,9 +19,11 @@ lifecycle:
- remote: /opt/chef/embedded/bin/chef-client -v
- remote: /opt/chef/embedded/bin/ohai -v
- remote: /opt/chef/embedded/bin/gem uninstall -x chef-bin # appbundle-updater doesn't remove this when downgrading to 14
- - remote: /opt/chef/embedded/bin/gem install appbundler appbundle-updater
+ - remote: /opt/chef/embedded/bin/rake --version
+ - remote: /opt/chef/embedded/bin/bundle -v
+ - remote: /opt/chef/embedded/bin/gem install appbundler appbundle-updater --no-doc
- 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'] || %x(git rev-parse HEAD).chomp %> --tarball --github chef/chef
+ - remote: /opt/chef/embedded/bin/appbundle-updater chef chef <%= ENV['BUILDKITE_COMMIT'] || %x(git rev-parse HEAD).chomp %> --tarball --github chef/chef
- remote: echo "Installed Chef / Ohai release:"
- remote: /opt/chef/embedded/bin/chef-client -v
- remote: /opt/chef/embedded/bin/ohai -v
@@ -81,6 +83,29 @@ platforms:
- RUN yum -y install e2fsprogs
- RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
+- name: oraclelinux-6
+ driver:
+ image: dokken/oraclelinux-6
+ pid_one_command: /sbin/init
+ intermediate_instructions:
+ - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
+
+- name: oraclelinux-7
+ driver:
+ image: dokken/oraclelinux-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: oraclelinux-8
+ driver:
+ image: dokken/oraclelinux-8
+ 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
@@ -102,9 +127,17 @@ platforms:
intermediate_instructions:
- RUN /usr/bin/apt-get update
-- name: opensuse-leap
+- name: opensuse-leap-42
+ driver:
+ image: dokken/opensuse-leap-42
+ pid_one_command: /bin/systemd
+ intermediate_instructions:
+ - RUN /usr/bin/zypper --non-interactive update
+ - RUN /usr/bin/zypper --non-interactive install cron
+
+- name: opensuse-leap-15
driver:
- image: dokken/opensuse-leap
+ image: dokken/opensuse-leap-15
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/zypper --non-interactive update