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.6.17 spec/redhat/iptables_spec.rb