Sha256: 7689278227a897fde9b1fc3b0a00120c7fb3ca32733171b3f1fc87cdfa88886d

Contents?: true

Size: 588 Bytes

Versions: 13

Compression:

Stored size: 588 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" }
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

13 entries across 13 versions & 1 rubygems

Version Path
serverspec-0.14.3 spec/debian/iptables_spec.rb
serverspec-0.14.2 spec/debian/iptables_spec.rb
serverspec-0.14.1 spec/debian/iptables_spec.rb
serverspec-0.14.0 spec/debian/iptables_spec.rb
serverspec-0.13.7 spec/debian/iptables_spec.rb
serverspec-0.13.6 spec/debian/iptables_spec.rb
serverspec-0.13.5 spec/debian/iptables_spec.rb
serverspec-0.13.4 spec/debian/iptables_spec.rb
serverspec-0.13.3 spec/debian/iptables_spec.rb
serverspec-0.13.2 spec/debian/iptables_spec.rb
serverspec-0.13.1 spec/debian/iptables_spec.rb
serverspec-0.13.0 spec/debian/iptables_spec.rb
serverspec-0.12.0 spec/debian/iptables_spec.rb