Sha256: 8a398e9b9f618f4bfedf3e830b637bc7806293d2a6c43839e57eba00721b5eb4

Contents?: true

Size: 589 Bytes

Versions: 41

Compression:

Stored size: 589 Bytes

Contents

require 'spec_helper'

include Serverspec::Helper::RedHat

describe iptables do
  it { should have_rule '-P INPUT ACCEPT'  }
  its(:command) { should eq "iptables -S | 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" }
end

describe iptables do
  it { should_not have_rule('invalid-rule').with_table('mangle').with_chain('INPUT') }
end

Version data entries

41 entries across 39 versions & 1 rubygems

Version Path
serverspec-0.11.5 spec/redhat/iptables_spec.rb
serverspec-0.11.4 spec/redhat/iptables_spec.rb
serverspec-0.11.3 spec/redhat/iptables_spec.rb
serverspec-0.11.2 spec/redhat/iptables_spec.rb
serverspec-0.9.4 spec/redhat/iptables_spec.rb
serverspec-0.9.3 spec/aix/iptables_spec.rb
serverspec-0.9.3 spec/redhat/iptables_spec.rb
serverspec-0.9.2 spec/redhat/iptables_spec.rb
serverspec-0.9.2 spec/aix/iptables_spec.rb
serverspec-0.9.1 spec/redhat/iptables_spec.rb
serverspec-0.9.0 spec/redhat/iptables_spec.rb
serverspec-0.8.1 spec/redhat/iptables_spec.rb
serverspec-0.8.0 spec/redhat/iptables_spec.rb
serverspec-0.7.13 spec/redhat/iptables_spec.rb
serverspec-0.7.12 spec/redhat/iptables_spec.rb
serverspec-0.7.11 spec/redhat/iptables_spec.rb
serverspec-0.7.10 spec/redhat/iptables_spec.rb
serverspec-0.7.9 spec/redhat/iptables_spec.rb
serverspec-0.7.8 spec/redhat/iptables_spec.rb
serverspec-0.7.7 spec/redhat/iptables_spec.rb