Sha256: 1de4fdc17cee7bdd8f8ce689471bfee07bd64c7ebe44b3b6a0a85164ee5b35b7

Contents?: true

Size: 699 Bytes

Versions: 2

Compression:

Stored size: 699 Bytes

Contents

require 'spec_helper'

include SpecInfra::Helper::Plamo

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/plamo/ip6tables_spec.rb
serverspec-1.15.0 spec/plamo/ip6tables_spec.rb