AIX exits with 2 on file doesn't exist.
This commit is contained in:
orang tua
5e841a91f7
melakukan
17a59b2b13
3 mengubah file dengan 31 tambahan dan 29 penghapusan
|
@ -2,16 +2,16 @@ require 'spec_helper_acceptance'
|
|||
|
||||
describe 'ini_setting resource' do
|
||||
after :all do
|
||||
shell("rm /tmp/*.ini", :acceptable_exit_codes => [0,1])
|
||||
shell("rm /tmp/*.ini", :acceptable_exit_codes => [0,1,2])
|
||||
end
|
||||
|
||||
shared_examples 'has_content' do |path,pp,content|
|
||||
before :all do
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1])
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1,2])
|
||||
end
|
||||
after :all do
|
||||
shell("cat #{path}", :acceptable_exit_codes => [0,1])
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1])
|
||||
shell("cat #{path}", :acceptable_exit_codes => [0,1,2])
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1,2])
|
||||
end
|
||||
|
||||
it 'applies the manifest twice with no stderr' do
|
||||
|
@ -27,11 +27,11 @@ describe 'ini_setting resource' do
|
|||
|
||||
shared_examples 'has_error' do |path,pp,error|
|
||||
before :all do
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1])
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1,2])
|
||||
end
|
||||
after :all do
|
||||
shell("cat #{path}", :acceptable_exit_codes => [0,1])
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1])
|
||||
shell("cat #{path}", :acceptable_exit_codes => [0,1,2])
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1,2])
|
||||
end
|
||||
|
||||
it 'applies the manifest and gets a failure message' do
|
||||
|
@ -106,8 +106,8 @@ describe 'ini_setting resource' do
|
|||
shell('echo -e "four = five\n[one]\ntwo = three" > /tmp/ini_setting.ini')
|
||||
end
|
||||
after :all do
|
||||
shell("cat /tmp/ini_setting.ini", :acceptable_exit_codes => [0,1])
|
||||
shell("rm /tmp/ini_setting.ini", :acceptable_exit_codes => [0,1])
|
||||
shell("cat /tmp/ini_setting.ini", :acceptable_exit_codes => [0,1,2])
|
||||
shell("rm /tmp/ini_setting.ini", :acceptable_exit_codes => [0,1,2])
|
||||
end
|
||||
|
||||
pp = <<-EOS
|
||||
|
@ -136,8 +136,8 @@ describe 'ini_setting resource' do
|
|||
shell('echo -e "four = five\n[one]\ntwo = three" > /tmp/ini_setting.ini')
|
||||
end
|
||||
after :all do
|
||||
shell("cat /tmp/ini_setting.ini", :acceptable_exit_codes => [0,1])
|
||||
shell("rm /tmp/ini_setting.ini", :acceptable_exit_codes => [0,1])
|
||||
shell("cat /tmp/ini_setting.ini", :acceptable_exit_codes => [0,1,2])
|
||||
shell("rm /tmp/ini_setting.ini", :acceptable_exit_codes => [0,1,2])
|
||||
end
|
||||
|
||||
pp = <<-EOS
|
||||
|
|
|
@ -2,16 +2,16 @@ require 'spec_helper_acceptance'
|
|||
|
||||
describe 'ini_subsetting resource' do
|
||||
after :all do
|
||||
shell("rm /tmp/*.ini", :acceptable_exit_codes => [0,1])
|
||||
shell("rm /tmp/*.ini", :acceptable_exit_codes => [0,1,2])
|
||||
end
|
||||
|
||||
shared_examples 'has_content' do |path,pp,content|
|
||||
before :all do
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1])
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1,2])
|
||||
end
|
||||
after :all do
|
||||
shell("cat #{path}", :acceptable_exit_codes => [0,1])
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1])
|
||||
shell("cat #{path}", :acceptable_exit_codes => [0,1,2])
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1,2])
|
||||
end
|
||||
|
||||
it 'applies the manifest twice with no stderr' do
|
||||
|
@ -27,11 +27,11 @@ describe 'ini_subsetting resource' do
|
|||
|
||||
shared_examples 'has_error' do |path,pp,error|
|
||||
before :all do
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1])
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1,2])
|
||||
end
|
||||
after :all do
|
||||
shell("cat #{path}", :acceptable_exit_codes => [0,1])
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1])
|
||||
shell("cat #{path}", :acceptable_exit_codes => [0,1,2])
|
||||
shell("rm #{path}", :acceptable_exit_codes => [0,1,2])
|
||||
end
|
||||
|
||||
it 'applies the manifest and gets a failure message' do
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
require 'beaker-rspec/spec_helper'
|
||||
require 'beaker-rspec/helpers/serverspec'
|
||||
|
||||
hosts.each do |host|
|
||||
if host['platform'] =~ /debian/
|
||||
on host, 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc'
|
||||
end
|
||||
if host.is_pe?
|
||||
install_pe
|
||||
else
|
||||
# Install Puppet
|
||||
install_package host, 'rubygems'
|
||||
on host, 'gem install puppet --no-ri --no-rdoc'
|
||||
on host, "mkdir -p #{host['distmoduledir']}"
|
||||
unless ENV['RS_PROVISION'] == 'no'
|
||||
hosts.each do |host|
|
||||
if host['platform'] =~ /debian/
|
||||
on host, 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc'
|
||||
end
|
||||
if host.is_pe?
|
||||
install_pe
|
||||
else
|
||||
# Install Puppet
|
||||
install_package host, 'rubygems'
|
||||
on host, 'gem install puppet --no-ri --no-rdoc'
|
||||
on host, "mkdir -p #{host['distmoduledir']}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Memuat…
Reference in a new issue