# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
- expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
+ if do_catch_changes
+ expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
+ end
end
it 'ensure => stopped:' do
# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
- expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
+ if do_catch_changes
+ expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
+ end
end
it 'ensure => running:' do
# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
- expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
+ if do_catch_changes
+ expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
+ end
end
end
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rule' do
EOS
# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'finds the chain' do
EOS
# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'fails to find the chain' do
# EOS
# # Run it twice and test for idempotency
# apply_manifest(pp, :catch_failures => true)
- # apply_manifest(pp, :catch_changes => true)
+ # apply_manifest(pp, :catch_changes => do_catch_changes)
# end
#end
# expect(r.stdout).to_not match(/removed/)
# expect(r.stderr).to eq('')
# end
- # apply_manifest(pp, :catch_changes => true)
+ # apply_manifest(pp, :catch_changes => do_catch_changes)
# end
# it 'still has the rule' do
# }
# EOS
# # Run it twice and test for idempotency
- # apply_manifest(pp, :catch_changes => true)
+ # apply_manifest(pp, :catch_changes => do_catch_changes)
# end
#end
EOS
# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'finds the chain' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'should contain the rules' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
shell('ip6tables-save') do |r|
expect(r.stdout).to match(/#{line_match}/)
}
EOS
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
shell('ip6tables-save') do |r|
expect(r.stdout).to match(/#{line_match}/)
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
shell('iptables-save') do |r|
expect(r.stdout).to match(/#{line_match}/)
}
EOS
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
shell('iptables-save') do |r|
expect(r.stdout).to match(/#{line_match}/)
}
EOS
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'ignores specified rules' do
}
EOS
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'adds managed rules with ignored rules' do
}
EOS
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'ignores specified rules' do
}
EOS
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'adds managed rules with ignored rules' do
# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
it 'contains appropriate rules' do
# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ apply_manifest(pp, :catch_changes => do_catch_changes)
end
end
end
end
+def do_catch_changes
+ if default['platform'] =~ /el-5/
+ return false
+ else
+ return true
+ end
+end
+
run_puppet_install_helper
UNSUPPORTED_PLATFORMS = ['windows','Solaris','Darwin']