Sha256: 0f445f08290583d026991aeef6f0f8c257b2cf225c50831c668fae13181ee230

Contents?: true

Size: 700 Bytes

Versions: 2

Compression:

Stored size: 700 Bytes

Contents

require 'spec_helper'

include SpecInfra::Helper::Debian

describe ip6tables do
  it { should have_rule '-P INPUT ACCEPT'  }
  its(:command) { should eq "ip6tables -S | grep -- -P\\ INPUT\\ ACCEPT || ip6tables-save | grep -- -P\\ INPUT\\ ACCEPT" }
end

describe ip6tables do
  it { should_not have_rule 'invalid-rule' }
end

describe ip6tables do
  it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') }
  its(:command) { should eq "ip6tables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT || ip6tables-save -t mangle | grep -- -P\\ INPUT\\ ACCEPT" }
end

describe ip6tables do
  it { should_not have_rule('invalid-rule').with_table('mangle').with_chain('INPUT') }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
serverspec-1.16.0 spec/debian/ip6tables_spec.rb
serverspec-1.15.0 spec/debian/ip6tables_spec.rb