summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalim Alam <salam@chef.io>2016-01-11 16:46:00 -0800
committerSalim Alam <salam@chef.io>2016-01-12 13:29:27 -0800
commit3135bcc201d60710b4bad76f427b603869e7adb1 (patch)
tree1042dcd8a2d1c847763002747b251e585e22417d
parent67904eae428dcd2158bd3654fad7aec7c6875f20 (diff)
downloadchef-3135bcc201d60710b4bad76f427b603869e7adb1.tar.gz
Initial 'trivial' acceptance test suite
-rw-r--r--acceptance/Gemfile12
-rw-r--r--acceptance/Gemfile.lock135
-rw-r--r--acceptance/README.md30
-rw-r--r--acceptance/trivial/.acceptance/acceptance-cookbook/.gitignore2
-rw-r--r--acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb1
-rw-r--r--acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb3
-rw-r--r--acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb3
-rw-r--r--acceptance/trivial/.acceptance/acceptance-cookbook/recipes/verify.rb4
-rw-r--r--acceptance/trivial/.kitchen.yml27
-rw-r--r--acceptance/trivial/chefignore1
-rw-r--r--acceptance/trivial/test/integration/chef-current-install/inspec/chef_client_spec.rb3
11 files changed, 221 insertions, 0 deletions
diff --git a/acceptance/Gemfile b/acceptance/Gemfile
new file mode 100644
index 0000000000..af2bbf815b
--- /dev/null
+++ b/acceptance/Gemfile
@@ -0,0 +1,12 @@
+source 'https://rubygems.org'
+
+gem "mixlib-install", github: "chef/mixlib-install"
+gem "chef-acceptance", github: "chef/chef-acceptance"
+gem "test-kitchen", github: "sersut/test-kitchen", branch: "sersut/mixlib-install-update"
+gem 'kitchen-inspec'
+
+group(:development) do
+ gem "kitchen-vagrant"
+ gem "windows_chef_zero"
+ gem "winrm-transport"
+end
diff --git a/acceptance/Gemfile.lock b/acceptance/Gemfile.lock
new file mode 100644
index 0000000000..e53c19776a
--- /dev/null
+++ b/acceptance/Gemfile.lock
@@ -0,0 +1,135 @@
+GIT
+ remote: git://github.com/chef/chef-acceptance.git
+ revision: 47f5f54e561981802122168ca01ae03907965312
+ specs:
+ chef-acceptance (0.2.0)
+ thor (~> 0.19)
+
+GIT
+ remote: git://github.com/chef/mixlib-install.git
+ revision: 90533f4268765ed48b4b0bd22b5aa4d9fcef0b48
+ specs:
+ mixlib-install (0.8.0.alpha.3)
+ artifactory (~> 2.3.0)
+ mixlib-versioning (~> 1.1.0)
+
+GIT
+ remote: git://github.com/sersut/test-kitchen.git
+ revision: fd05389ec556fdcac96b92b1aea2a9ed48802e75
+ branch: sersut/mixlib-install-update
+ specs:
+ test-kitchen (1.4.3.dev.0)
+ mixlib-shellout (>= 1.2, < 3.0)
+ net-scp (~> 1.1)
+ net-ssh (~> 2.7, < 2.10)
+ safe_yaml (~> 1.0)
+ thor (~> 0.18)
+
+GEM
+ remote: https://rubygems.org/
+ specs:
+ artifactory (2.3.2)
+ builder (3.2.2)
+ coderay (1.1.0)
+ diff-lcs (1.2.5)
+ docker-api (1.24.1)
+ excon (>= 0.38.0)
+ json
+ excon (0.45.4)
+ ffi (1.9.10)
+ gssapi (1.2.0)
+ ffi (>= 1.0.1)
+ gyoku (1.3.1)
+ builder (>= 2.1.2)
+ httpclient (2.7.1)
+ inspec (0.9.8)
+ json (~> 1.8)
+ method_source (~> 0.8)
+ pry (~> 0)
+ r-train (~> 0.9, >= 0.9.3)
+ rainbow (~> 2)
+ rspec (~> 3.3)
+ rspec-its (~> 1.2)
+ rubyzip (~> 1.1)
+ thor (~> 0.19)
+ json (1.8.3)
+ kitchen-inspec (0.10.0)
+ inspec (~> 0.9)
+ kitchen-vagrant (0.19.0)
+ test-kitchen (~> 1.4)
+ little-plugger (1.1.4)
+ logging (2.0.0)
+ little-plugger (~> 1.1)
+ multi_json (~> 1.10)
+ method_source (0.8.2)
+ mixlib-shellout (2.2.5)
+ mixlib-versioning (1.1.0)
+ multi_json (1.11.2)
+ net-scp (1.2.1)
+ net-ssh (>= 2.6.5)
+ net-ssh (2.9.2)
+ nori (2.6.0)
+ pry (0.10.3)
+ coderay (~> 1.1.0)
+ method_source (~> 0.8.1)
+ slop (~> 3.4)
+ r-train (0.9.3)
+ docker-api (~> 1.22)
+ json (~> 1.8)
+ mixlib-shellout (~> 2.1)
+ net-scp (~> 1.2)
+ net-ssh (~> 2.9)
+ winrm (~> 1.3)
+ winrm-transport (~> 1.0)
+ rainbow (2.0.0)
+ rspec (3.4.0)
+ rspec-core (~> 3.4.0)
+ rspec-expectations (~> 3.4.0)
+ rspec-mocks (~> 3.4.0)
+ rspec-core (3.4.1)
+ rspec-support (~> 3.4.0)
+ rspec-expectations (3.4.0)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.4.0)
+ rspec-its (1.2.0)
+ rspec-core (>= 3.0.0)
+ rspec-expectations (>= 3.0.0)
+ rspec-mocks (3.4.1)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.4.0)
+ rspec-support (3.4.1)
+ rubyntlm (0.4.0)
+ rubyzip (1.1.7)
+ safe_yaml (1.0.4)
+ slop (3.6.0)
+ thor (0.19.1)
+ uuidtools (2.1.5)
+ windows_chef_zero (2.0.0)
+ test-kitchen (>= 1.2.1)
+ winrm (1.5.0)
+ builder (>= 2.1.2)
+ gssapi (~> 1.2)
+ gyoku (~> 1.0)
+ httpclient (~> 2.2, >= 2.2.0.2)
+ logging (>= 1.6.1, < 3.0)
+ nori (~> 2.0)
+ rubyntlm (~> 0.4.0)
+ uuidtools (~> 2.1.2)
+ winrm-transport (1.0.3)
+ rubyzip (~> 1.1, >= 1.1.7)
+ winrm (~> 1.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ chef-acceptance!
+ kitchen-inspec
+ kitchen-vagrant
+ mixlib-install!
+ test-kitchen!
+ windows_chef_zero
+ winrm-transport
+
+BUNDLED WITH
+ 1.11.2
diff --git a/acceptance/README.md b/acceptance/README.md
new file mode 100644
index 0000000000..b14fbbb376
--- /dev/null
+++ b/acceptance/README.md
@@ -0,0 +1,30 @@
+# Acceptance Testing for Chef Client
+This folder contains acceptance tests that are required for Chef client
+release readiness.
+
+## Getting started
+The tests use the _chef-acceptance_ gem as the high level framework.
+All the gems needed to run these tests can be installed with Bundler.
+
+```shell
+chef/acceptance$ bundle install
+```
+
+To ensure everything is working properly, run:
+
+```shell
+chef/acceptance$ bundle exec chef-acceptance info
+```
+
+To run a particular test suite, do the following:
+```shell
+chef/acceptance$ bundle exec chef-acceptance test TEST_SUITE
+```
+
+### Important Note!
+
+Before running chef-acceptance, you *MUST* do the following on your current session:
+
+```
+export APPBUNDLER_ALLOW_RVM=true
+```
diff --git a/acceptance/trivial/.acceptance/acceptance-cookbook/.gitignore b/acceptance/trivial/.acceptance/acceptance-cookbook/.gitignore
new file mode 100644
index 0000000000..041413b040
--- /dev/null
+++ b/acceptance/trivial/.acceptance/acceptance-cookbook/.gitignore
@@ -0,0 +1,2 @@
+nodes/
+tmp/
diff --git a/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb b/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb
new file mode 100644
index 0000000000..4c7c42d9bd
--- /dev/null
+++ b/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb
@@ -0,0 +1 @@
+name 'acceptance-cookbook'
diff --git a/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb b/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb
new file mode 100644
index 0000000000..f226ea2d10
--- /dev/null
+++ b/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb
@@ -0,0 +1,3 @@
+execute 'bundle exec kitchen destroy' do
+ cwd node['chef-acceptance']['suite-dir']
+end
diff --git a/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb b/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb
new file mode 100644
index 0000000000..2763aba70c
--- /dev/null
+++ b/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb
@@ -0,0 +1,3 @@
+execute 'bundle exec kitchen converge' do
+ cwd node['chef-acceptance']['suite-dir']
+end
diff --git a/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/verify.rb b/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/verify.rb
new file mode 100644
index 0000000000..eb58f81f79
--- /dev/null
+++ b/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/verify.rb
@@ -0,0 +1,4 @@
+# execute "inspec exec inspec/test.rb -t ssh://vagrant@chef-current-install-ubuntu-1404" do
+execute "bundle exec kitchen verify" do
+ cwd node['chef-acceptance']['suite-dir']
+end
diff --git a/acceptance/trivial/.kitchen.yml b/acceptance/trivial/.kitchen.yml
new file mode 100644
index 0000000000..a7d0a25f93
--- /dev/null
+++ b/acceptance/trivial/.kitchen.yml
@@ -0,0 +1,27 @@
+driver:
+ name: vagrant
+ forward_agent: yes
+ customize:
+ cpus: 2
+ memory: 1024
+
+provisioner:
+ name: chef_zero
+
+verifier:
+ name: inspec
+
+platforms:
+ - name: ubuntu-14.04
+ run_list:
+# - name: windows-server-2012r2-standard
+# driver:
+# box: chef/windows-server-2012r2-standard # private
+
+suites:
+ - name: chef-current-install
+ provisioner:
+ product_name: chef
+ product_version: latest
+ channel: current
+ run_list:
diff --git a/acceptance/trivial/chefignore b/acceptance/trivial/chefignore
new file mode 100644
index 0000000000..7be3c6dfaf
--- /dev/null
+++ b/acceptance/trivial/chefignore
@@ -0,0 +1 @@
+.kitchen
diff --git a/acceptance/trivial/test/integration/chef-current-install/inspec/chef_client_spec.rb b/acceptance/trivial/test/integration/chef-current-install/inspec/chef_client_spec.rb
new file mode 100644
index 0000000000..9c4a34f544
--- /dev/null
+++ b/acceptance/trivial/test/integration/chef-current-install/inspec/chef_client_spec.rb
@@ -0,0 +1,3 @@
+describe command('chef-client') do
+ it { should exist }
+end