Skip to content

Commit c965643

Browse files
author
Travis Fields
committed
Fix exclude windows test
1 parent 03f0ecd commit c965643

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

spec/acceptance/ensure_resource_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 'spec_helper_acceptance'
33

44

5-
describe 'ensure_resource function', :unless => (UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) || fact('osfamily') == 'windows') do
5+
describe 'ensure_resource function', :unless => fact('osfamily') =~ /windows/ do
66
describe 'success' do
77
it 'ensure_resource a package' do
88
apply_manifest('package { "rake": ensure => absent, provider => "gem", }')

spec/spec_helper_acceptance.rb

+9-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,15 @@
88
install_pe
99
on hosts, 'mkdir -p /etc/puppetlabs/facter/facts.d'
1010
else
11-
install_puppet
12-
on hosts, 'mkdir -p /etc/facter/facts.d'
13-
on hosts, '/bin/touch /etc/puppet/hiera.yaml'
11+
install_puppet :version => (ENV['PUPPET_VERSION'] ? ENV['PUPPET_VERSION'] : '3.7.2')
12+
hosts.each do |host|
13+
if host['platform'] =~ /windows/i
14+
15+
else
16+
on host, 'mkdir -p /etc/facter/facts.d'
17+
on host, '/bin/touch /etc/puppet/hiera.yaml'
18+
end
19+
end
1420
end
1521
hosts.each do |host|
1622
on host, "mkdir -p #{host['distmoduledir']}"

0 commit comments

Comments
 (0)