diff options
author | Matt Wrock <matt@mattwrock.com> | 2016-07-24 00:17:24 -0700 |
---|---|---|
committer | Matt Wrock <matt@mattwrock.com> | 2016-07-24 00:17:24 -0700 |
commit | a81aa3f9a33890b88bbdc02634162d113c53dbc8 (patch) | |
tree | 38440552fc37b0e45440a48d081d30ebcb4c3b66 /acceptance | |
parent | 1aadc96bcb855fe665cad4b4004ee657d241e5ec (diff) | |
download | chef-a81aa3f9a33890b88bbdc02634162d113c53dbc8.tar.gz |
add back and fix windows acceptance testswinrm-v2
Diffstat (limited to 'acceptance')
18 files changed, 119 insertions, 90 deletions
diff --git a/acceptance/.gitignore b/acceptance/.gitignore index c2ab70737d..4b0b151d75 100644 --- a/acceptance/.gitignore +++ b/acceptance/.gitignore @@ -1 +1,3 @@ .acceptance_logs +.acceptance_data +data-collector/Berksfile.lock diff --git a/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml b/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml index 40228829bb..dfe3d888a0 100644 --- a/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +++ b/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml @@ -213,18 +213,7 @@ platforms: image-type: machine user_data: | <powershell> - $logfile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Logs\\kitchen-ec2.log" - #PS Remoting and & winrm.cmd basic config - Enable-PSRemoting -Force -SkipNetworkProfileCheck - & winrm.cmd set winrm/config '@{MaxTimeoutms="1800000"}' >> $logfile - & winrm.cmd set winrm/config/winrs '@{MaxMemoryPerShellMB="1024"}' >> $logfile - & winrm.cmd set winrm/config/winrs '@{MaxShellsPerUser="50"}' >> $logfile - #Server settings - support username/password login - & winrm.cmd set winrm/config/service/auth '@{Basic="true"}' >> $logfile - & winrm.cmd set winrm/config/service '@{AllowUnencrypted="true"}' >> $logfile - & winrm.cmd set winrm/config/winrs '@{MaxMemoryPerShellMB="1024"}' >> $logfile - #Firewall Config - & netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" profile=public protocol=tcp localport=5985 remoteip=localsubnet new remoteip=any >> $logfile + & netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" profile=public protocol=tcp localport=5985 remoteip=localsubnet new remoteip=any #Set script execution to unrestricted & Set-ExecutionPolicy Unrestricted -Force </powershell> diff --git a/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb b/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb index b6dab451c7..d5d2e1380b 100644 --- a/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb +++ b/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb @@ -54,6 +54,8 @@ module KitchenAcceptance begin shell_out!("bundle exec kitchen #{command}#{instances ? " #{instances}" : ""}#{kitchen_options ? " #{kitchen_options}" : ""}", env: cmd_env, + timeout: 60 * 30, + live_stream: STDOUT, cwd: kitchen_dir) ensure FileUtils.mkdir_p("#{kitchen_log_path}/#{suite}/#{command}") diff --git a/acceptance/Gemfile b/acceptance/Gemfile index 185437ed71..b521df8607 100644 --- a/acceptance/Gemfile +++ b/acceptance/Gemfile @@ -1,13 +1,16 @@ source "https://rubygems.org" gem "chef-acceptance", github: "chef/chef-acceptance" -gem "test-kitchen" gem "kitchen-ec2" -gem "kitchen-inspec" gem "inspec" # Pinning to github for kitchen-vagrant because 0.19.0 incorrectly # puts in a box_url for bento when a vagrant box in atlas is specified gem "kitchen-vagrant" gem "windows_chef_zero" -gem "winrm-fs" +gem "kitchen-inspec", :github => "mwrock/kitchen-inspec", :branch => "winrm-v2" +gem "test-kitchen", :github => "test-kitchen", :branch => "winrm-v2" +gem "train", :github => "chef/train", :branch => "winrm-v2" +gem "winrm", :github => "winrb/winrm", :branch => "winrm-v2" +gem "winrm-fs", :github => "winrb/winrm-fs", :branch => "winrm-v2" +gem "winrm-elevated", :github => "winrb/winrm-elevated", :branch => "winrm-v2" gem "berkshelf" diff --git a/acceptance/Gemfile.lock b/acceptance/Gemfile.lock index 899644c3b8..ff9d439b5b 100644 --- a/acceptance/Gemfile.lock +++ b/acceptance/Gemfile.lock @@ -6,17 +6,88 @@ GIT mixlib-shellout (~> 2.0) thor (~> 0.19) +GIT + remote: git://github.com/chef/train.git + revision: cc92f89267f128ee78bc12da803722268e2f6af2 + branch: winrm-v2 + specs: + train (0.15.0) + docker-api (~> 1.26) + json (~> 1.8) + mixlib-shellout (~> 2.0) + net-scp (~> 1.2) + net-ssh (>= 2.9, < 4.0) + winrm (~> 2.0) + winrm-fs (~> 1.0) + +GIT + remote: git://github.com/mwrock/kitchen-inspec.git + revision: d63240a44667974070298ad4fca20394257c92bd + branch: winrm-v2 + specs: + kitchen-inspec (0.14.0) + inspec (>= 0.22.0, < 1.0.0) + test-kitchen (~> 1.6) + +GIT + remote: git://github.com/test-kitchen/test-kitchen.git + revision: 06d7c0168ed6390c87a821ae8958e7d80c4d1912 + branch: winrm-v2 + specs: + test-kitchen (1.10.2) + mixlib-install (~> 1.0, >= 1.0.4) + mixlib-shellout (>= 1.2, < 3.0) + net-scp (~> 1.1) + net-ssh (>= 2.9, < 4.0) + safe_yaml (~> 1.0) + thor (~> 0.18) + +GIT + remote: git://github.com/winrb/winrm-elevated.git + revision: 160bf424e018b2539fdde73079443e565ae57260 + branch: winrm-v2 + specs: + winrm-elevated (1.0.0) + winrm (~> 2.0) + winrm-fs (~> 1.0) + +GIT + remote: git://github.com/winrb/winrm-fs.git + revision: ceb883b87fb81898e73e9249f287457ccb9d549f + branch: winrm-v2 + specs: + winrm-fs (1.0.0) + erubis (~> 2.7) + logging (>= 1.6.1, < 3.0) + rubyzip (~> 1.1) + winrm + +GIT + remote: git://github.com/winrb/winrm.git + revision: 0f35bbd963024b32cc8e262f25e6110c6abf5794 + branch: winrm-v2 + specs: + winrm (2.0.0) + builder (>= 2.1.2) + erubis (~> 2.7) + gssapi (~> 1.2) + gyoku (~> 1.0) + httpclient (~> 2.2, >= 2.2.0.2) + logging (>= 1.6.1, < 3.0) + nori (~> 2.0) + rubyntlm (~> 0.6.0) + GEM remote: https://rubygems.org/ specs: addressable (2.4.0) artifactory (2.3.3) - aws-sdk (2.4.0) - aws-sdk-resources (= 2.4.0) - aws-sdk-core (2.4.0) + aws-sdk (2.4.2) + aws-sdk-resources (= 2.4.2) + aws-sdk-core (2.4.2) jmespath (~> 1.0) - aws-sdk-resources (2.4.0) - aws-sdk-core (= 2.4.0) + aws-sdk-resources (2.4.2) + aws-sdk-core (= 2.4.2) berkshelf (4.3.5) addressable (~> 2.3, >= 2.3.4) berkshelf-api-client (~> 2.0, >= 2.0.2) @@ -76,7 +147,7 @@ GEM hashie (3.4.4) hitimes (1.2.4) httpclient (2.7.2) - inspec (0.28.0) + inspec (0.26.0) hashie (~> 3.4) json (~> 1.8) method_source (~> 0.8) @@ -86,7 +157,7 @@ GEM rspec-its (~> 1.2) rubyzip (~> 1.1) thor (~> 0.19) - train (>= 0.15.1, < 1.0) + train (~> 0.13) jmespath (1.3.1) json (1.8.3) kitchen-ec2 (1.0.1) @@ -95,9 +166,6 @@ GEM multi_json retryable (~> 2.0) test-kitchen (~> 1.4, >= 1.4.1) - kitchen-inspec (0.15.0) - inspec (>= 0.22.0, < 1.0.0) - test-kitchen (~> 1.6) kitchen-vagrant (0.20.0) test-kitchen (~> 1.4) little-plugger (1.1.4) @@ -179,42 +247,14 @@ GEM solve (2.0.3) molinillo (~> 0.4.2) semverse (~> 1.1) - test-kitchen (1.10.2) - mixlib-install (~> 1.0, >= 1.0.4) - mixlib-shellout (>= 1.2, < 3.0) - net-scp (~> 1.1) - net-ssh (>= 2.9, < 4.0) - safe_yaml (~> 1.0) - thor (~> 0.18) thor (0.19.1) timers (4.0.4) hitimes - train (0.15.1) - docker-api (~> 1.26) - json (~> 1.8) - mixlib-shellout (~> 2.0) - net-scp (~> 1.2) - net-ssh (>= 2.9, < 4.0) - winrm (~> 1.6) - winrm-fs (~> 0.3) varia_model (0.4.1) buff-extensions (~> 1.0) hashie (>= 2.0.2, < 4.0.0) windows_chef_zero (2.0.0) test-kitchen (>= 1.2.1) - winrm (1.8.1) - 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.6.0) - winrm-fs (0.4.3) - erubis (~> 2.7) - logging (>= 1.6.1, < 3.0) - rubyzip (~> 1.1) - winrm (~> 1.5) PLATFORMS ruby @@ -224,11 +264,14 @@ DEPENDENCIES chef-acceptance! inspec kitchen-ec2 - kitchen-inspec + kitchen-inspec! kitchen-vagrant - test-kitchen + test-kitchen! + train! windows_chef_zero - winrm-fs + winrm! + winrm-elevated! + winrm-fs! BUNDLED WITH 1.12.5 diff --git a/acceptance/basics/.kitchen.yml b/acceptance/basics/.kitchen.yml index 5dad8bcd98..4b7a516396 100644 --- a/acceptance/basics/.kitchen.yml +++ b/acceptance/basics/.kitchen.yml @@ -1,5 +1,4 @@ suites: - name: chef-current-install - #includes: [ubuntu-14.04, windows-server-2012r2] - includes: [ubuntu-14.04] + includes: [ubuntu-14.04, windows-server-2012r2] run_list: diff --git a/acceptance/data-collector/Berksfile.lock b/acceptance/data-collector/Berksfile.lock deleted file mode 100644 index 39f4ce30dc..0000000000 --- a/acceptance/data-collector/Berksfile.lock +++ /dev/null @@ -1,6 +0,0 @@ -DEPENDENCIES - data-collector-test - path: .acceptance/data-collector-test - -GRAPH - data-collector-test (0.1.0) diff --git a/acceptance/fips/.kitchen.yml b/acceptance/fips/.kitchen.yml index 87dbd30f5d..23280f9142 100644 --- a/acceptance/fips/.kitchen.yml +++ b/acceptance/fips/.kitchen.yml @@ -1,10 +1,8 @@ suites: - name: fips-unit-functional - #includes: [centos-6, windows-2012r2] - includes: [centos-6] + includes: [centos-6, windows-2012r2] run_list: - name: fips-integration - #includes: [centos-6, windows-2012r2] - includes: [centos-6] + includes: [centos-6, windows-2012r2] run_list: diff --git a/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/top_cookbooks.rb b/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/top_cookbooks.rb index c605083fb2..73f5151bca 100644 --- a/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/top_cookbooks.rb +++ b/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/top_cookbooks.rb @@ -17,23 +17,23 @@ class TopCookbooks < Chef::Resource cookbook_relative_dir "cookbooks/learn-the-basics-ubuntu" end - # cookbook_kitchen "#{command} learn-the-basics-windows" do - # repository "learn-chef/learn-chef-acceptance" - # cookbook_relative_dir "cookbooks/learn-the-basics-windows" - # end + cookbook_kitchen "#{command} learn-the-basics-windows" do + repository "learn-chef/learn-chef-acceptance" + cookbook_relative_dir "cookbooks/learn-the-basics-windows" + end - # cookbook_kitchen "#{command} powershell" do - # end + cookbook_kitchen "#{command} powershell" do + end - # cookbook_kitchen "#{command} iis" do - # end + cookbook_kitchen "#{command} iis" do + end - # cookbook_kitchen "#{command} sql_server" do - # end + cookbook_kitchen "#{command} sql_server" do + end - # cookbook_kitchen "#{command} winbox" do - # repository "adamedx/winbox" - # end + cookbook_kitchen "#{command} winbox" do + repository "adamedx/winbox" + end # cookbook_kitchen "#{command} windows" do # end diff --git a/acceptance/top-cookbooks/.kitchen.git.yml b/acceptance/top-cookbooks/.kitchen.git.yml index 3115600ecc..302657dffc 100644 --- a/acceptance/top-cookbooks/.kitchen.git.yml +++ b/acceptance/top-cookbooks/.kitchen.git.yml @@ -6,6 +6,6 @@ suites: - name: git-source run_list: ["recipe[git::source]"] includes: [nonexistent] - #- name: git-default-windows - # run_list: ["recipe[git]"] - # includes: [windows-2012r2] + - name: git-default-windows + run_list: ["recipe[git]"] + includes: [windows-2012r2] diff --git a/acceptance/trivial/.kitchen.yml b/acceptance/trivial/.kitchen.yml index cdc0bd6bd4..0db67c468f 100644 --- a/acceptance/trivial/.kitchen.yml +++ b/acceptance/trivial/.kitchen.yml @@ -3,6 +3,5 @@ verifier: suites: - name: chef-current-install - #includes: [ubuntu-14.04, windows-server-2012r2] - includes: [ubuntu-14.04] + includes: [ubuntu-14.04, windows-server-2012r2] run_list: diff --git a/acceptance/windows-service_disabled/.acceptance/acceptance-cookbook/.gitignore b/acceptance/windows-service/.acceptance/acceptance-cookbook/.gitignore index 041413b040..041413b040 100644 --- a/acceptance/windows-service_disabled/.acceptance/acceptance-cookbook/.gitignore +++ b/acceptance/windows-service/.acceptance/acceptance-cookbook/.gitignore diff --git a/acceptance/windows-service_disabled/.acceptance/acceptance-cookbook/metadata.rb b/acceptance/windows-service/.acceptance/acceptance-cookbook/metadata.rb index 6c754560f0..6c754560f0 100644 --- a/acceptance/windows-service_disabled/.acceptance/acceptance-cookbook/metadata.rb +++ b/acceptance/windows-service/.acceptance/acceptance-cookbook/metadata.rb diff --git a/acceptance/windows-service_disabled/.acceptance/acceptance-cookbook/recipes/destroy.rb b/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/destroy.rb index e12f938cf3..e12f938cf3 100644 --- a/acceptance/windows-service_disabled/.acceptance/acceptance-cookbook/recipes/destroy.rb +++ b/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/destroy.rb diff --git a/acceptance/windows-service_disabled/.acceptance/acceptance-cookbook/recipes/provision.rb b/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/provision.rb index cec9de4e5d..cec9de4e5d 100644 --- a/acceptance/windows-service_disabled/.acceptance/acceptance-cookbook/recipes/provision.rb +++ b/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/provision.rb diff --git a/acceptance/windows-service_disabled/.acceptance/acceptance-cookbook/recipes/verify.rb b/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/verify.rb index 52e3560cf6..52e3560cf6 100644 --- a/acceptance/windows-service_disabled/.acceptance/acceptance-cookbook/recipes/verify.rb +++ b/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/verify.rb diff --git a/acceptance/windows-service_disabled/.kitchen.yml b/acceptance/windows-service/.kitchen.yml index 5270e81487..5270e81487 100644 --- a/acceptance/windows-service_disabled/.kitchen.yml +++ b/acceptance/windows-service/.kitchen.yml diff --git a/acceptance/windows-service_disabled/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb b/acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb index a791177362..75383b69bf 100644 --- a/acceptance/windows-service_disabled/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb +++ b/acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb @@ -13,7 +13,7 @@ describe service("chef-client") do it { should_not be_running } end -describe command("chef-service-manager -a install") do +describe command("/opscode/chef/bin/chef-service-manager.bat -a install") do its("exit_status") { should eq 0 } its(:stdout) { should match /Service 'chef-client' has successfully been installed./ } end @@ -24,7 +24,7 @@ describe service("chef-client") do it { should_not be_running } end -describe command("chef-service-manager -a start") do +describe command("/opscode/chef/bin/chef-service-manager.bat -a start") do its("exit_status") { should eq 0 } its(:stdout) { should match /Service 'chef-client' is now 'running'/ } end @@ -35,7 +35,7 @@ describe service("chef-client") do it { should be_running } end -describe command("chef-service-manager -a stop") do +describe command("/opscode/chef/bin/chef-service-manager.bat -a stop") do its("exit_status") { should eq 0 } its(:stdout) { should match /Service 'chef-client' is now 'stopped'/ } end @@ -46,7 +46,7 @@ describe service("chef-client") do it { should_not be_running } end -describe command("chef-service-manager -a uninstall") do +describe command("/opscode/chef/bin/chef-service-manager.bat -a uninstall") do its("exit_status") { should eq 0 } its(:stdout) { should match /Service chef-client deleted/ } end |