Sha256: 4507834e91fcd60f6008c2d840f5e679bc4c9d6782426da1799f0d560535aa2c

Contents?: true

Size: 692 Bytes

Versions: 29

Compression:

Stored size: 692 Bytes

Contents

require 'spec_helper'

include SpecInfra::Helper::Gentoo

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.16.0 spec/gentoo/iptables_spec.rb
serverspec-1.15.0 spec/gentoo/iptables_spec.rb
serverspec-1.14.0 spec/gentoo/iptables_spec.rb
serverspec-1.13.0 spec/gentoo/iptables_spec.rb
serverspec-1.12.0 spec/gentoo/iptables_spec.rb
serverspec-1.11.0 spec/gentoo/iptables_spec.rb
serverspec-1.10.0 spec/gentoo/iptables_spec.rb
serverspec-1.9.1 spec/gentoo/iptables_spec.rb
serverspec-1.9.0 spec/gentoo/iptables_spec.rb
serverspec-1.8.0 spec/gentoo/iptables_spec.rb
serverspec-1.7.1 spec/gentoo/iptables_spec.rb
serverspec-1.7.0 spec/gentoo/iptables_spec.rb
serverspec-1.6.0 spec/gentoo/iptables_spec.rb
serverspec-1.5.0 spec/gentoo/iptables_spec.rb
serverspec-1.4.2 spec/gentoo/iptables_spec.rb
serverspec-1.4.1 spec/gentoo/iptables_spec.rb
serverspec-1.4.0 spec/gentoo/iptables_spec.rb
serverspec-1.3.0 spec/gentoo/iptables_spec.rb
serverspec-1.2.0 spec/gentoo/iptables_spec.rb
serverspec-1.1.0 spec/gentoo/iptables_spec.rb