EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
end
it 'should contain the rule' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
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)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
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)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
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)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
end
it 'finds the chain' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
end
it 'should contain the rules' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
shell('ip6tables-save') do |r|
expect(r.stdout).to match(/#{line_match}/)
}
EOS
- apply_manifest(pp, :catch_changes => true)
+ if fact('selinux') == 'true'
+ apply_manifest(pp, :catch_failures => true)
+ else
+ apply_manifest(pp, :catch_changes => true)
+ end
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)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
shell('iptables-save') do |r|
expect(r.stdout).to match(/#{line_match}/)
}
EOS
- apply_manifest(pp, :catch_changes => true)
+ if fact('selinux') == 'true'
+ apply_manifest(pp, :catch_failures => true)
+ else
+ apply_manifest(pp, :catch_changes => true)
+ end
shell('iptables-save') do |r|
expect(r.stdout).to match(/#{line_match}/)
}
EOS
- apply_manifest(pp, :catch_changes => true)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
end
it 'ignores specified rules' do
}
EOS
- apply_manifest(pp, :catch_changes => true)
+ if fact('selinux') == 'true'
+ apply_manifest(pp, :catch_failures => true)
+ else
+ apply_manifest(pp, :catch_changes => true)
+ end
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)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
end
it 'contains appropriate rules' do
EOS
apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
shell('iptables-save -t raw') do |r|
expect(r.stdout).to match(/#{line_match}/)
}
EOS
- apply_manifest(pp, :catch_changes => true)
+ if fact('selinux') == 'true'
+ apply_manifest(pp, :catch_failures => true)
+ else
+ apply_manifest(pp, :catch_changes => true)
+ end
shell('iptables-save -t raw') do |r|
expect(r.stdout).to match(/#{line_match}/)
# 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
+ unless fact('selinux') == 'true'
+ apply_manifest(pp, :catch_changes => true)
+ end
end
end