Skip to content

Instantly share code, notes, and snippets.

@irvingpop
Last active August 29, 2015 14:17
Show Gist options
  • Save irvingpop/38989cb99cf21c8efd5e to your computer and use it in GitHub Desktop.
Save irvingpop/38989cb99cf21c8efd5e to your computer and use it in GitHub Desktop.
test-kitchen Windows guest working

As of March 24, 2015 that the 'windows-guest-support' branch of test-kitchen has been merged to master, but not the equivalent kitchen-vagrant branch.

Using the Windows cookbook, Gemfile like so:

source "https://rubygems.org"

group :development do
  gem "test-kitchen", :git => 'https://github.com/test-kitchen/test-kitchen.git'
  gem 'kitchen-vagrant', git: 'https://github.com/test-kitchen/kitchen-vagrant.git', :branch => 'windows-guest-support'
  gem "berkshelf"
  gem "vagrant-wrapper", ">= 2.0"
end

With the following Git refs in my Gemfile.lock:

GIT
  remote: https://github.com/test-kitchen/kitchen-vagrant.git
  revision: 46eded6a3f6980ed0761c99c9663a2ad5f641900
  branch: windows-guest-support
  specs:
    kitchen-vagrant (0.16.1.dev)
      test-kitchen (~> 1.0)

GIT
  remote: https://github.com/test-kitchen/test-kitchen.git
  revision: 4f2e2189937cb2e83ef173e3b48aef46a05ef1fa
  specs:
    test-kitchen (1.3.2.dev)
      mixlib-shellout (>= 1.2, < 3.0)
      net-scp (~> 1.1)
      net-ssh (~> 2.7)
      rubyzip (~> 1.1, >= 1.1.7)
      safe_yaml (~> 1.0)
      thor (~> 0.18)
      winrm (~> 1.3)

Install the gem bundle in the windows cookbook:

bundle install --binstubs

Side quest, build a base box built using boxcutter/windows:

git clone [email protected]:boxcutter/windows.git boxcutter-windows
cd boxcutter-windows/
make virtualbox/eval-win2012r2-datacenter
vagrant box add win2012r2-datacenter-nocm box/virtualbox/eval-win2012r2-datacenter-nocm-1.0.4.box

Modifying the windows cookbook .kitchen.yml like so:

---
driver:
  forward_agent: yes
  name: vagrant
  customize:
    cpus: 2
    memory: 4096

transport:
  name: winrm

provisioner:
  name: chef_zero

platforms:
  - name: win2012r2-datacenter-nocm
    driver_config:
      box: win2012r2-datacenter-nocm
    provisioner:
      require_chef_omnibus: 12

suites:
  - name: default
    run_list:
      - recipe[windows::default]
      - recipe[minimal::default]

and the test-kitchen run:

irving01:/oc/src/windows (master)$ bundle exec kitchen list
Instance                           Driver   Provisioner  Verifier  Transport  Last Action
default-win2012r2-datacenter-nocm  Vagrant  ChefZero     Busser    Winrm      <Not Created>


irving01:/oc/src/windows (master)$ bundle exec kitchen test nocm
-----> Starting Kitchen (v1.3.2.dev)
-----> Cleaning up any prior instances of <default-win2012r2-datacenter-nocm>
-----> Destroying <default-win2012r2-datacenter-nocm>...
       Finished destroying <default-win2012r2-datacenter-nocm> (0m0.00s).
-----> Testing <default-win2012r2-datacenter-nocm>
-----> Creating <default-win2012r2-datacenter-nocm>...
       Bringing machine 'default' up with 'virtualbox' provider...
       ==> default: Importing base box 'win2012r2-datacenter-nocm'...
==> default: Matching MAC address for NAT networking...
       ==> default: Setting the name of the VM: kitchen-windows-default-win2012r2-datacenter-nocm_default_1427209082925_84213
       ==> default: Clearing any previously set network interfaces...
       ==> default: Preparing network interfaces based on configuration...
           default: Adapter 1: nat
       ==> default: Forwarding ports...
           default: 3389 => 3389 (adapter 1)
           default: 5985 => 5985 (adapter 1)
           default: 22 => 2222 (adapter 1)
       ==> default: Running 'pre-boot' VM customizations...
       ==> default: Booting VM...
       ==> default: Waiting for machine to boot. This may take a few minutes...
       ==> default: Machine booted and ready!
       ==> default: Checking for guest additions in VM...
       ==> default: Checking for host entries
       ==> default: Mounting shared folders...
           default: /tmp/vagrant-cache => /oc/vagrant/cache/win2012r2-datacenter-nocm
       ==> default: Configuring cache buckets...
       ==> default: Skipping Chef cache bucket as the guest machine does not support it
       ==> default: Skipping APT cache bucket as the guest machine does not support it
       ==> default: Skipping Yum cache bucket as the guest machine does not support it
       ==> default: Skipping RubyGems cache bucket as the guest machine does not support it
       ==> default: Machine not provisioning because `--no-provision` is specified.
       [WinRM] Established
       Vagrant instance <default-win2012r2-datacenter-nocm> created.
       Finished creating <default-win2012r2-datacenter-nocm> (1m35.76s).
-----> Converging <default-win2012r2-datacenter-nocm>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 3.2.3...
       Removing non-cookbook files before transfer
       Preparing validation.pem
       Preparing client.rb
-----> Installing Chef Omnibus (12)
       Downloading package from https://opscode-omnibus-packages.s3.amazonaws.com/windows/2008r2/x86_64/chef-client-12.1.2-1.msi
       Download complete.
       Successfully verified C:\Users\vagrant\AppData\Local\Temp\chef-12.msi
       
       Installing Chef Omnibus package C:\Users\vagrant\AppData\Local\Temp\chef-12.msi
       Installation complete
       Transferring files to <default-win2012r2-datacenter-nocm>
       Starting Chef Client, version 12.1.2
       Creating a new client identity for default-win2012r2-datacenter-nocm using the validator key.
       [2015-03-24T08:00:02-07:00] WARN: Child with name 'dna.json' found in multiple directories: C:/Users/vagrant/AppData/Local/Temp/kitchen/dna.json and C:/Users/vagrant/AppData/Local/Temp/kitchen/dna.json
       [2015-03-24T08:00:02-07:00] WARN: Child with name 'dna.json' found in multiple directories: C:/Users/vagrant/AppData/Local/Temp/kitchen/dna.json and C:/Users/vagrant/AppData/Local/Temp/kitchen/dna.json
       resolving cookbooks for run list: ["windows::default", "minimal::default"]
       [2015-03-24T08:00:02-07:00] WARN: Child with name 'dna.json' found in multiple directories: C:/Users/vagrant/AppData/Local/Temp/kitchen/dna.json and C:/Users/vagrant/AppData/Local/Temp/kitchen/dna.json
       Synchronizing Cookbooks:
         - windows
         - minimal
         - chef_handler
       Compiling Cookbooks...
       [2015-03-24T08:00:04-07:00] WARN: chef_gem[win32-api] chef_gem compile_time installation is deprecated
       [2015-03-24T08:00:04-07:00] WARN: chef_gem[win32-api] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:00:04-07:00] WARN: chef_gem[win32-api] or set `compile_time true` on the resource if compile_time behavior is required.
       Recipe: windows::default
        (up to date)
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[win32-service] chef_gem compile_time installation is deprecated
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[win32-service] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[win32-service] or set `compile_time true` on the resource if compile_time behavior is required.
        (up to date)
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[windows-api] chef_gem compile_time installation is deprecated
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[windows-api] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[windows-api] or set `compile_time true` on the resource if compile_time behavior is required.
        (up to date)
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[windows-pr] chef_gem compile_time installation is deprecated
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[windows-pr] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[windows-pr] or set `compile_time true` on the resource if compile_time behavior is required.
        (up to date)
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[win32-dir] chef_gem compile_time installation is deprecated
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[win32-dir] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[win32-dir] or set `compile_time true` on the resource if compile_time behavior is required.
        (up to date)
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[win32-event] chef_gem compile_time installation is deprecated
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[win32-event] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[win32-event] or set `compile_time true` on the resource if compile_time behavior is required.
        (up to date)
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[win32-mutex] chef_gem compile_time installation is deprecated
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[win32-mutex] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:00:06-07:00] WARN: chef_gem[win32-mutex] or set `compile_time true` on the resource if compile_time behavior is required.
        (up to date)
         Converging 13 resources
        (up to date)
        (up to date)
        (up to date)
        (up to date)
        (up to date)
        (up to date)
        (up to date)
       Recipe: minimal::default
         * windows_path[C:\path_test_path] action add
       
           
           * ruby_block[fix ruby ENV['PATH']] action run
             - execute the ruby block fix ruby ENV['PATH']
           * ruby_block[fix ruby ENV['PATH']] action nothing (skipped due to action :nothing)
         
       
           - execute "powershell.exe" -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Unrestricted -InputFormat None -File "C:/Users/vagrant/AppData/Local/Temp/chef-script20150324-3420-fxdqog.ps1"
       
         Recipe: <Dynamically Defined Resource>
       
             - create new file C:\Users\vagrant\AppData\Local\Temp\kitchen\cache/Firefox Setup 5.0.exe
             - update content in file C:\Users\vagrant\AppData\Local\Temp\kitchen\cache/Firefox Setup 5.0.exe from none to d3b3c9
             (file sizes exceed 10000000 bytes, diff output suppressed)
         
       Recipe: minimal::default
       
         Recipe: <Dynamically Defined Resource>
           * cookbook_file[CodeNewRoman.otf] action create
             - create new file C:\Users\vagrant\AppData\Local\Temp\CodeNewRoman.otf
             - update content in file C:\Users\vagrant\AppData\Local\Temp\CodeNewRoman.otf from none to dfa191
       
           * file[C:\Users\vagrant\AppData\Local\Temp/CodeNewRoman.otf] action delete
             - delete file C:\Users\vagrant\AppData\Local\Temp/CodeNewRoman.otf
         
       Recipe: minimal::default
       
         
       
         
       
       Running handlers:
       Running handlers complete
       Chef Client finished, 11/25 resources updated in 24.187473 seconds
       Finished converging <default-win2012r2-datacenter-nocm> (1m34.04s).
-----> Setting up <default-win2012r2-datacenter-nocm>...
       Finished setting up <default-win2012r2-datacenter-nocm> (0m0.00s).
-----> Verifying <default-win2012r2-datacenter-nocm>...
       Preparing files for transfer
-----> Installing Busser (busser)
       Successfully installed thor-0.19.0
       Successfully installed busser-0.7.0
       2 gems installed
-----> Setting up Busser
       Creating BUSSER_ROOT in C:\Users\vagrant\AppData\Local\Temp\verifier
       Creating busser binstub
       Installing Busser plugins: busser-serverspec
       Plugin serverspec installed (version 0.5.3)
-----> Running postinstall for serverspec plugin
       Suite path directory C:\Users\vagrant\AppData\Local\Temp\verifier/suites does not exist, skipping.
       Transferring files to <default-win2012r2-datacenter-nocm>
-----> Running serverspec test suite
-----> Installing Serverspec..
-----> serverspec installed (version 2.13.0)
       
       Host File
         File "c:/chef"
           should be directory (FAILED - 1)
       
       Failures:
       
         1) Host File File "c:/chef" should be directory
            Failure/Error: it { should be_directory }
            TypeError:
       no implicit conversion of Symbol into Integer
       ls /etc/debian_version
       #< CLIXML
       <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><S S="Error">ls : Cannot find path 'C:\etc\debian_version' because it does not exist._x000D__x000A_</S><S S="Error">At line:1 char:1_x000D__x000A_</S><S S="Error">+ ls /etc/debian_version_x000D__x000A_</S><S S="Error">+ ~~~~~~~~~~~~~~~~~~~~~~_x000D__x000A_</S><S S="Error">    + CategoryInfo          : ObjectNotFound: (C:\etc\debian_version:String) [ _x000D__x000A_</S><S S="Error">   Get-ChildItem], ItemNotFoundException_x000D__x000A_</S><S S="Error">    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetCh _x000D__x000A_</S><S S="Error">   ildItemCommand_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>
            # ./AppData/Local/Temp/verifier/gems/gems/specinfra-2.25.1/lib/specinfra/command_factory.rb:26:in `[]'
            # ./AppData/Local/Temp/verifier/gems/gems/specinfra-2.25.1/lib/specinfra/command_factory.rb:26:in `create_command_class'
            # ./AppData/Local/Temp/verifier/gems/gems/specinfra-2.25.1/lib/specinfra/command_factory.rb:16:in `get'
            # ./AppData/Local/Temp/verifier/gems/gems/specinfra-2.25.1/lib/specinfra/runner.rb:26:in `run'
            # ./AppData/Local/Temp/verifier/gems/gems/specinfra-2.25.1/lib/specinfra/runner.rb:13:in `method_missing'
            # ./AppData/Local/Temp/verifier/gems/gems/serverspec-2.13.0/lib/serverspec/type/file.rb:18:in `directory?'
            # ./AppData/Local/Temp/verifier/suites/serverspec/hosts_spec.rb:6:in `block (3 levels) in <top (required)>'
       
       Finished in 12.25 seconds (files took 0.48481 seconds to load)
       1 example, 1 failure
       
       Failed examples:
       
       rspec ./AppData/Local/Temp/verifier/suites/serverspec/hosts_spec.rb:6 # Host File File "c:/chef" should be directory
       
       C:/opscode/chef/embedded/bin/ruby.exe -IC:/Users/vagrant/AppData/Local/Temp/verifier/suites/serverspec -I'C:/Users/vagrant/AppData/Local/Temp/verifier/gems/gems/rspec-support-3.2.2/lib';'C:/Users/vagrant/AppData/Local/Temp/verifier/gems/gems/rspec-core-3.2.2/lib' 'C:/Users/vagrant/AppData/Local/Temp/verifier/gems/gems/rspec-core-3.2.2/exe/rspec' --pattern 'C:/Users/vagrant/AppData/Local/Temp/verifier/suites/serverspec/**/*_spec.rb' --color --format documentation --default-path C:/Users/vagrant/AppData/Local/Temp/verifier/suites/serverspec
$$$$$$ C:/opscode/chef/embedded/bin/ruby.exe -IC:/Users/vagrant/AppData/Local/Temp/verifier/suites/serverspec -I'C:/Users/vagrant/AppData/Local/Temp/verifier/gems/gems/rspec-support-3.2.2/lib';'C:/Users/vagrant/AppData/Local/Temp/verifier/gems/gems/rspec-core-3.2.2/lib' 'C:/Users/vagrant/AppData/Local/Temp/verifier/gems/gems/rspec-core-3.2.2/exe/rspec' --pattern 'C:/Users/vagrant/AppData/Local/Temp/verifier/suites/serverspec/**/*_spec.rb' --color --format documentation --default-path C:/Users/vagrant/AppData/Local/Temp/verifier/suites/serverspec failed
$$$$$$ !!!!!! Ruby Script [C:/Users/vagrant/AppData/Local/Temp/verifier/gems/gems/busser-serverspec-0.5.3/lib/busser/runner_plugin/../serverspec/runner.rb C:\Users\vagrant\AppData\Local\Temp\verifier/suites/serverspec] exit code was 1
>>>>>> Verify failed on instance <default-win2012r2-datacenter-nocm>.
>>>>>> Please see .kitchen/logs/default-win2012r2-datacenter-nocm.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: WinRM exited (1) for command: [
$env:BUSSER_ROOT = "$env:TEMP\verifier"
$env:GEM_HOME = "$env:TEMP\verifier\gems"
$env:GEM_PATH = "$env:TEMP\verifier\gems"
$env:GEM_CACHE = "$env:TEMP\verifier\gems\cache"

& $env:TEMP\verifier\bin\busser.bat test
]
>>>>>> ----------------------

Note: the failing test isn't test-kitchen's fault, appears to be related to: chef-boneyard/windows#193

Second run, with Fletcher's fix applied:

irving01:/oc/src/windows (master)$ git diff test/integration/default/serverspec/spec_helper.rb
diff --git a/test/integration/default/serverspec/spec_helper.rb b/test/integration/default/serverspec/spec_helper.rb
index 0641f72..844ee75 100644
--- a/test/integration/default/serverspec/spec_helper.rb
+++ b/test/integration/default/serverspec/spec_helper.rb
@@ -1,3 +1,9 @@
 require 'serverspec'
 
 set :backend, :cmd
+
+require 'rbconfig'
+case RbConfig::CONFIG['host_os']
+when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
+    set :os, :family => 'windows'
+end

success:

irving01:/oc/src/windows (master)$ bundle exec kitchen test
-----> Starting Kitchen (v1.3.2.dev)
-----> Cleaning up any prior instances of <default-win2012r2-datacenter-nocm>
-----> Destroying <default-win2012r2-datacenter-nocm>...
       Finished destroying <default-win2012r2-datacenter-nocm> (0m0.00s).
-----> Testing <default-win2012r2-datacenter-nocm>
-----> Creating <default-win2012r2-datacenter-nocm>...
       Bringing machine 'default' up with 'virtualbox' provider...
       ==> default: Importing base box 'win2012r2-datacenter-nocm'...
==> default: Matching MAC address for NAT networking...
       ==> default: Setting the name of the VM: kitchen-windows-default-win2012r2-datacenter-nocm_default_1427210602406_83360
       ==> default: Clearing any previously set network interfaces...
       ==> default: Preparing network interfaces based on configuration...
           default: Adapter 1: nat
       ==> default: Forwarding ports...
           default: 3389 => 3389 (adapter 1)
           default: 5985 => 5985 (adapter 1)
           default: 22 => 2222 (adapter 1)
       ==> default: Running 'pre-boot' VM customizations...
       ==> default: Booting VM...
       ==> default: Waiting for machine to boot. This may take a few minutes...
       ==> default: Machine booted and ready!
       ==> default: Checking for guest additions in VM...
       ==> default: Checking for host entries
       ==> default: Mounting shared folders...
           default: /tmp/vagrant-cache => /oc/vagrant/cache/win2012r2-datacenter-nocm
       ==> default: Configuring cache buckets...
       ==> default: Skipping Chef cache bucket as the guest machine does not support it
       ==> default: Skipping APT cache bucket as the guest machine does not support it
       ==> default: Skipping Yum cache bucket as the guest machine does not support it
       ==> default: Skipping RubyGems cache bucket as the guest machine does not support it
       ==> default: Machine not provisioning because `--no-provision` is specified.
       [WinRM] Established
       Vagrant instance <default-win2012r2-datacenter-nocm> created.
       Finished creating <default-win2012r2-datacenter-nocm> (1m29.11s).
-----> Converging <default-win2012r2-datacenter-nocm>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 3.2.3...
       Removing non-cookbook files before transfer
       Preparing validation.pem
       Preparing client.rb
-----> Installing Chef Omnibus (12)
       Downloading package from https://opscode-omnibus-packages.s3.amazonaws.com/windows/2008r2/x86_64/chef-client-12.1.2-1.msi
       Download complete.
       Successfully verified C:\Users\vagrant\AppData\Local\Temp\chef-12.msi
       
       Installing Chef Omnibus package C:\Users\vagrant\AppData\Local\Temp\chef-12.msi
       Installation complete
       Transferring files to <default-win2012r2-datacenter-nocm>
       Starting Chef Client, version 12.1.2
       Creating a new client identity for default-win2012r2-datacenter-nocm using the validator key.
       [2015-03-24T08:25:31-07:00] WARN: Child with name 'dna.json' found in multiple directories: C:/Users/vagrant/AppData/Local/Temp/kitchen/dna.json and C:/Users/vagrant/AppData/Local/Temp/kitchen/dna.json
       [2015-03-24T08:25:31-07:00] WARN: Child with name 'dna.json' found in multiple directories: C:/Users/vagrant/AppData/Local/Temp/kitchen/dna.json and C:/Users/vagrant/AppData/Local/Temp/kitchen/dna.json
       resolving cookbooks for run list: ["windows::default", "minimal::default"]
       [2015-03-24T08:25:31-07:00] WARN: Child with name 'dna.json' found in multiple directories: C:/Users/vagrant/AppData/Local/Temp/kitchen/dna.json and C:/Users/vagrant/AppData/Local/Temp/kitchen/dna.json
       Synchronizing Cookbooks:
         - windows
         - minimal
         - chef_handler
       Compiling Cookbooks...
       [2015-03-24T08:25:33-07:00] WARN: chef_gem[win32-api] chef_gem compile_time installation is deprecated
       [2015-03-24T08:25:33-07:00] WARN: chef_gem[win32-api] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:25:33-07:00] WARN: chef_gem[win32-api] or set `compile_time true` on the resource if compile_time behavior is required.
       Recipe: windows::default
        (up to date)
       [2015-03-24T08:25:35-07:00] WARN: chef_gem[win32-service] chef_gem compile_time installation is deprecated
       [2015-03-24T08:25:35-07:00] WARN: chef_gem[win32-service] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:25:35-07:00] WARN: chef_gem[win32-service] or set `compile_time true` on the resource if compile_time behavior is required.
        (up to date)
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[windows-api] chef_gem compile_time installation is deprecated
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[windows-api] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[windows-api] or set `compile_time true` on the resource if compile_time behavior is required.
        (up to date)
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[windows-pr] chef_gem compile_time installation is deprecated
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[windows-pr] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[windows-pr] or set `compile_time true` on the resource if compile_time behavior is required.
        (up to date)
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[win32-dir] chef_gem compile_time installation is deprecated
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[win32-dir] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[win32-dir] or set `compile_time true` on the resource if compile_time behavior is required.
        (up to date)
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[win32-event] chef_gem compile_time installation is deprecated
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[win32-event] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[win32-event] or set `compile_time true` on the resource if compile_time behavior is required.
        (up to date)
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[win32-mutex] chef_gem compile_time installation is deprecated
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[win32-mutex] Please set `compile_time false` on the resource to use the new behavior.
       [2015-03-24T08:25:36-07:00] WARN: chef_gem[win32-mutex] or set `compile_time true` on the resource if compile_time behavior is required.
        (up to date)
         Converging 13 resources
        (up to date)
        (up to date)
        (up to date)
        (up to date)
        (up to date)
        (up to date)
        (up to date)
       Recipe: minimal::default
         * windows_path[C:\path_test_path] action add
       
           
           * ruby_block[fix ruby ENV['PATH']] action run
             - execute the ruby block fix ruby ENV['PATH']
           * ruby_block[fix ruby ENV['PATH']] action nothing (skipped due to action :nothing)
         
       
           - execute "powershell.exe" -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Unrestricted -InputFormat None -File "C:/Users/vagrant/AppData/Local/Temp/chef-script20150324-3440-b4kj9o.ps1"
       
         Recipe: <Dynamically Defined Resource>
       
             - create new file C:\Users\vagrant\AppData\Local\Temp\kitchen\cache/Firefox Setup 5.0.exe
             - update content in file C:\Users\vagrant\AppData\Local\Temp\kitchen\cache/Firefox Setup 5.0.exe from none to d3b3c9
             (file sizes exceed 10000000 bytes, diff output suppressed)
         
       Recipe: minimal::default
       
         Recipe: <Dynamically Defined Resource>
           * cookbook_file[CodeNewRoman.otf] action create
       
             - update content in file C:\Users\vagrant\AppData\Local\Temp\CodeNewRoman.otf from none to dfa191
             (new content is binary, diff output suppressed)
           * file[C:\Users\vagrant\AppData\Local\Temp/CodeNewRoman.otf] action delete
             - delete file C:\Users\vagrant\AppData\Local\Temp/CodeNewRoman.otf
         
       Recipe: minimal::default
       
         
       
         
       
       Running handlers:
       Running handlers complete
       Chef Client finished, 11/25 resources updated in 25.466617 seconds
       Finished converging <default-win2012r2-datacenter-nocm> (1m46.02s).
-----> Setting up <default-win2012r2-datacenter-nocm>...
       Finished setting up <default-win2012r2-datacenter-nocm> (0m0.00s).
-----> Verifying <default-win2012r2-datacenter-nocm>...
       Preparing files for transfer
-----> Installing Busser (busser)
       Successfully installed thor-0.19.0
       Successfully installed busser-0.7.0
       2 gems installed
-----> Setting up Busser
       Creating BUSSER_ROOT in C:\Users\vagrant\AppData\Local\Temp\verifier
       Creating busser binstub
       Installing Busser plugins: busser-serverspec
       Plugin serverspec installed (version 0.5.3)
-----> Running postinstall for serverspec plugin
       Suite path directory C:\Users\vagrant\AppData\Local\Temp\verifier/suites does not exist, skipping.
       Transferring files to <default-win2012r2-datacenter-nocm>
-----> Running serverspec test suite
-----> Installing Serverspec..
-----> serverspec installed (version 2.13.0)
       
       Host File
         File "c:/chef"
           should be directory
       
       Finished in 0.24842 seconds (files took 0.42348 seconds to load)
       1 example, 0 failures
       
       C:/opscode/chef/embedded/bin/ruby.exe -IC:/Users/vagrant/AppData/Local/Temp/verifier/suites/serverspec -I'C:/Users/vagrant/AppData/Local/Temp/verifier/gems/gems/rspec-support-3.2.2/lib';'C:/Users/vagrant/AppData/Local/Temp/verifier/gems/gems/rspec-core-3.2.2/lib' 'C:/Users/vagrant/AppData/Local/Temp/verifier/gems/gems/rspec-core-3.2.2/exe/rspec' --pattern 'C:/Users/vagrant/AppData/Local/Temp/verifier/suites/serverspec/**/*_spec.rb' --color --format documentation --default-path C:/Users/vagrant/AppData/Local/Temp/verifier/suites/serverspec
       Finished verifying <default-win2012r2-datacenter-nocm> (0m21.21s).
-----> Destroying <default-win2012r2-datacenter-nocm>...
       ==> default: Forcing shutdown of VM...
       ==> default: Destroying VM and associated drives...
       ==> default: Removing hosts
       Vagrant instance <default-win2012r2-datacenter-nocm> destroyed.
       Finished destroying <default-win2012r2-datacenter-nocm> (0m5.72s).
       Finished testing <default-win2012r2-datacenter-nocm> (3m42.07s).
-----> Kitchen is finished. (3m42.81s)

@stephenlauck
Copy link

🐺
Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment