diff options
author | Salim Alam <salam@chef.io> | 2016-01-11 16:46:00 -0800 |
---|---|---|
committer | Salim Alam <salam@chef.io> | 2016-01-11 16:46:00 -0800 |
commit | b725c85227f0d65ee368263f1b5083247b3a445a (patch) | |
tree | 6b323b91a5919942c8c6dd269526d3cd695b09a6 | |
parent | 7e8b2b40832fa0dc4365d6661442cd4aaf03368b (diff) | |
download | chef-b725c85227f0d65ee368263f1b5083247b3a445a.tar.gz |
Initial acceptance test: WIP
23 files changed, 396 insertions, 0 deletions
diff --git a/acceptance/Gemfile b/acceptance/Gemfile new file mode 100644 index 0000000000..44c6a334e4 --- /dev/null +++ b/acceptance/Gemfile @@ -0,0 +1,13 @@ +source 'https://rubygems.org' + +# "mixlib-install", github: "chef/mixlib-install" +gem "chef-acceptance", github: "chef/chef-acceptance" +gem "mixlib-shellout" +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..98c877dfa0 --- /dev/null +++ b/acceptance/Gemfile.lock @@ -0,0 +1,125 @@ +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/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: + 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) + 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-shellout + test-kitchen! + windows_chef_zero + winrm-transport + +BUNDLED WITH + 1.11.2 diff --git a/acceptance/bin/bundler b/acceptance/bin/bundler new file mode 100755 index 0000000000..72ca846efa --- /dev/null +++ b/acceptance/bin/bundler @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'bundler' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("bundler", "bundler") diff --git a/acceptance/bin/chef-acceptance b/acceptance/bin/chef-acceptance new file mode 100755 index 0000000000..680aeaaa21 --- /dev/null +++ b/acceptance/bin/chef-acceptance @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'chef-acceptance' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("chef-acceptance", "chef-acceptance") diff --git a/acceptance/bin/coderay b/acceptance/bin/coderay new file mode 100755 index 0000000000..b3b3eb1d92 --- /dev/null +++ b/acceptance/bin/coderay @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'coderay' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("coderay", "coderay") diff --git a/acceptance/bin/htmldiff b/acceptance/bin/htmldiff new file mode 100755 index 0000000000..2ca984d6ed --- /dev/null +++ b/acceptance/bin/htmldiff @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'htmldiff' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("diff-lcs", "htmldiff") diff --git a/acceptance/bin/httpclient b/acceptance/bin/httpclient new file mode 100755 index 0000000000..2bdf6fd819 --- /dev/null +++ b/acceptance/bin/httpclient @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'httpclient' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("httpclient", "httpclient") diff --git a/acceptance/bin/inspec b/acceptance/bin/inspec new file mode 100755 index 0000000000..0fb3df5f49 --- /dev/null +++ b/acceptance/bin/inspec @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'inspec' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("inspec", "inspec") diff --git a/acceptance/bin/kitchen b/acceptance/bin/kitchen new file mode 100755 index 0000000000..4030b78f12 --- /dev/null +++ b/acceptance/bin/kitchen @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'kitchen' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("test-kitchen", "kitchen") diff --git a/acceptance/bin/ldiff b/acceptance/bin/ldiff new file mode 100755 index 0000000000..0be9dc455a --- /dev/null +++ b/acceptance/bin/ldiff @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'ldiff' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("diff-lcs", "ldiff") diff --git a/acceptance/bin/pry b/acceptance/bin/pry new file mode 100755 index 0000000000..b80f4a7f08 --- /dev/null +++ b/acceptance/bin/pry @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'pry' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("pry", "pry") diff --git a/acceptance/bin/rspec b/acceptance/bin/rspec new file mode 100755 index 0000000000..3e07513cd8 --- /dev/null +++ b/acceptance/bin/rspec @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'rspec' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rspec-core", "rspec") diff --git a/acceptance/bin/rwinrm b/acceptance/bin/rwinrm new file mode 100755 index 0000000000..bc57c129d8 --- /dev/null +++ b/acceptance/bin/rwinrm @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'rwinrm' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("winrm", "rwinrm") diff --git a/acceptance/bin/safe_yaml b/acceptance/bin/safe_yaml new file mode 100755 index 0000000000..d6ad2ce229 --- /dev/null +++ b/acceptance/bin/safe_yaml @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'safe_yaml' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("safe_yaml", "safe_yaml") diff --git a/acceptance/bin/thor b/acceptance/bin/thor new file mode 100755 index 0000000000..5769ec97ba --- /dev/null +++ b/acceptance/bin/thor @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'thor' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("thor", "thor") 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..cefbc67aa6 --- /dev/null +++ b/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb @@ -0,0 +1,9 @@ +execute '../bin/kitchen destroy' do + cwd node['chef-acceptance']['suite-dir'] + + environment({ + "GEM_PATH" => "/Users/salam/.chefdk/gem/ruby/2.1.0:/opt/chefdk/embedded/lib/ruby/gems/2.1.0", + "GEM_ROOT" => "/opt/chefdk/embedded/lib/ruby/gems/2.1.0", + "GEM_HOME" => "/Users/salam/.chefdk/gem/ruby/2.1.0" + }) +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..ebd8718538 --- /dev/null +++ b/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb @@ -0,0 +1,3 @@ +execute '../bin/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..ca019682e8 --- /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 "../bin/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/inspec/test.rb b/acceptance/trivial/inspec/test.rb new file mode 100644 index 0000000000..ddb9144e45 --- /dev/null +++ b/acceptance/trivial/inspec/test.rb @@ -0,0 +1,3 @@ +describe command('chef-client') do + its(:exit_status) { should be 0 } +end |