Sha256: f9cfa49574b1b5b7815ef0b71e8574cb34ddaab80662cb5c4901f866f44add99

Contents?: true

Size: 692 Bytes

Versions: 29

Compression:

Stored size: 692 Bytes

Contents

require 'spec_helper'

include SpecInfra::Helper::Debian

describe iptables do
  it { should have_rule '-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 || 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

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
serverspec-1.0.0 spec/debian/iptables_spec.rb
serverspec-0.16.0 spec/debian/iptables_spec.rb
serverspec-0.15.5 spec/debian/iptables_spec.rb
serverspec-0.15.4 spec/debian/iptables_spec.rb
serverspec-0.15.3 spec/debian/iptables_spec.rb
serverspec-0.15.2 spec/debian/iptables_spec.rb
serverspec-0.15.1 spec/debian/iptables_spec.rb
serverspec-0.15.0 spec/debian/iptables_spec.rb
serverspec-0.14.4 spec/debian/iptables_spec.rb