mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
iptables integration test: split according to platform
centos puts quotes where ubuntu drops them
This commit is contained in:
parent
cdad6e63c3
commit
4ffc72bf93
1 changed files with 7 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
# encoding: utf-8
|
||||
|
||||
case os[:family]
|
||||
when 'ubuntu', 'rhel', 'centos', 'fedora'
|
||||
when 'ubuntu', 'fedora'
|
||||
describe iptables do
|
||||
it { should have_rule('-A INPUT -i eth0 -p tcp -m tcp --dport 80 -m state --state NEW -m comment --comment "http on 80" -j ACCEPT') }
|
||||
it { should_not have_rule('-A INPUT -i eth1 -p tcp -m tcp --dport 80 -j ACCEPT') }
|
||||
|
@ -9,4 +9,10 @@ when 'ubuntu', 'rhel', 'centos', 'fedora'
|
|||
# single-word comments have their quotes dropped
|
||||
it { should have_rule('-A derby-cognos-web -p tcp -m tcp --dport 80 -m comment --comment derby-cognos-web -j ACCEPT') }
|
||||
end
|
||||
when 'rhel', 'centos'
|
||||
describe iptables do
|
||||
it { should have_rule('-A INPUT -i eth0 -p tcp -m tcp --dport 80 -m state --state NEW -m comment --comment "http on 80" -j ACCEPT') }
|
||||
it { should_not have_rule('-A INPUT -i eth1 -p tcp -m tcp --dport 80 -j ACCEPT') }
|
||||
it { should have_rule('-A derby-cognos-web -p tcp -m tcp --dport 80 -m comment --comment "derby-cognos-web" -j ACCEPT') }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue