spec/gentoo/iptables_spec.rb in serverspec-0.14.3 vs spec/gentoo/iptables_spec.rb in serverspec-0.14.4

- old
+ new

@@ -2,19 +2,19 @@ include SpecInfra::Helper::Gentoo describe iptables do it { should have_rule '-P INPUT ACCEPT' } - its(:command) { should eq "iptables -S | grep -- -P\\ INPUT\\ ACCEPT" } + its(:command) { should eq "iptables -S | grep -- -P\\ INPUT\\ ACCEPT || iptables-save | grep -- -P\\ INPUT\\ ACCEPT" } end describe iptables do it { should_not have_rule 'invalid-rule' } end describe iptables do it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') } - its(:command) { should eq "iptables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT" } + its(:command) { should eq "iptables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT || iptables-save -t mangle | grep -- -P\\ INPUT\\ ACCEPT" } end describe iptables do it { should_not have_rule('invalid-rule').with_table('mangle').with_chain('INPUT') } end