Sha256: 076d8a028d259a7d8c76b76ad94fabe9532a890556cd4287f2334bfb2f0c3182

Contents?: true

Size: 588 Bytes

Versions: 4

Compression:

Stored size: 588 Bytes

Contents

require 'spec_helper'

include Serverspec::Helper::Plamo

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

4 entries across 4 versions & 1 rubygems

Version Path
serverspec-0.11.5 spec/plamo/iptables_spec.rb
serverspec-0.11.4 spec/plamo/iptables_spec.rb
serverspec-0.11.3 spec/plamo/iptables_spec.rb
serverspec-0.11.2 spec/plamo/iptables_spec.rb