Sha256: 7e518efc78e9c133e28be375b4d22bb215ff81be10e79fedb8a32b91775e6aed

Contents?: true

Size: 599 Bytes

Versions: 20

Compression:

Stored size: 599 Bytes

Contents

require 'spec_helper'

RSpec.configure do |c|
  c.os = 'RedHat'
end

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

20 entries across 20 versions & 1 rubygems

Version Path
serverspec-0.11.1 spec/redhat/iptables_spec.rb
serverspec-0.11.0 spec/redhat/iptables_spec.rb
serverspec-0.10.13 spec/redhat/iptables_spec.rb
serverspec-0.10.12 spec/redhat/iptables_spec.rb
serverspec-0.10.11 spec/redhat/iptables_spec.rb
serverspec-0.10.10 spec/redhat/iptables_spec.rb
serverspec-0.10.9 spec/redhat/iptables_spec.rb
serverspec-0.10.8 spec/redhat/iptables_spec.rb
serverspec-0.10.7 spec/redhat/iptables_spec.rb
serverspec-0.10.6 spec/redhat/iptables_spec.rb
serverspec-0.10.5 spec/redhat/iptables_spec.rb
serverspec-0.10.4 spec/redhat/iptables_spec.rb
serverspec-0.10.3 spec/redhat/iptables_spec.rb
serverspec-0.10.2 spec/redhat/iptables_spec.rb
serverspec-0.10.1 spec/redhat/iptables_spec.rb
serverspec-0.10.0 spec/redhat/iptables_spec.rb
serverspec-0.9.8 spec/redhat/iptables_spec.rb
serverspec-0.9.7 spec/redhat/iptables_spec.rb
serverspec-0.9.6 spec/redhat/iptables_spec.rb
serverspec-0.9.5 spec/redhat/iptables_spec.rb