Skip to content

Commit

Permalink
add a chef 13 test on appveyor
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Wrock <matt@mattwrock.com>
  • Loading branch information
mwrock committed Apr 23, 2017
1 parent 87fe94d commit 25cb16c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 7 deletions.
17 changes: 13 additions & 4 deletions .kitchen.appveyor.yml
Expand Up @@ -2,24 +2,33 @@
driver:
name: proxy
host: localhost
reset_command: "exit 0"
reset_command: "del $env:ChocolateyInstall -Recurse -Force"
port: 5985
username: <%= ENV["machine_user"] %>
password: <%= ENV["machine_pass"] %>

provisioner:
name: chef_zero
require_chef_omnibus: 12.19.36

platforms:
- name: windows-2012R2

suites:
- name: default
- name: chef_12
provisioner:
require_chef_omnibus: 12.19.36
run_list:
- recipe[chocolatey::default]
- recipe[chocolatey_test::default]
attributes:
chocolatey:
install_vars:
chocolateyVersion: 0.9.10.3
chocolateyVersion: 0.10.5

- name: chef_latest
run_list:
- recipe[chocolatey::default]
attributes:
chocolatey:
install_vars:
chocolateyVersion: 0.10.5
6 changes: 4 additions & 2 deletions .kitchen.yml
Expand Up @@ -14,11 +14,13 @@ verifier:
name: inspec

suites:
- name: default
- name: chef_12
provisioner:
require_chef_omnibus: 12.19.36
run_list:
- recipe[chocolatey::default]
- recipe[chocolatey_test::default]
attributes:
chocolatey:
install_vars:
chocolateyVersion: 0.9.10.3
chocolateyVersion: 0.10.5
Expand Up @@ -16,7 +16,7 @@
end

describe command("#{choco_exe} --version") do
its(:stdout) { should eq("0.9.10.3\r\n") }
its(:stdout) { should eq("0.10.5\r\n") }
end

describe file(chocolatey_nupkg) do
Expand Down
20 changes: 20 additions & 0 deletions test/integration/chef_latest/default_spec.rb
@@ -0,0 +1,20 @@
choco_exe = File.join(ENV['ProgramData'], 'chocolatey', 'bin', 'choco.exe')
chocolatey_nupkg = File.join(
ENV['ProgramData'], 'chocolatey', 'lib', 'chocolatey', 'chocolatey.nupkg'
)

describe command(choco_exe) do
its(:stdout) { should match(/Chocolatey/) }
end

describe command("#{choco_exe} list -l chocolatey") do
its(:stdout) { should match(/[1-9] packages installed\./) }
end

describe command("#{choco_exe} --version") do
its(:stdout) { should eq("0.10.5\r\n") }
end

describe file(chocolatey_nupkg) do
it { should exist }
end

0 comments on commit 25cb16c

Please sign in to comment.