Mercurial > repos > other > Puppet
comparison modules/firewall/spec/acceptance/connmark_spec.rb @ 39:d6f2a0ee45c0 puppet-3.6
Add "Firewall" module
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 14 Mar 2015 20:58:03 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
38:a1960fb961c5 | 39:d6f2a0ee45c0 |
---|---|
1 require 'spec_helper_acceptance' | |
2 | |
3 describe 'firewall type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do | |
4 | |
5 describe 'connmark' do | |
6 context '50' do | |
7 it 'applies' do | |
8 pp = <<-EOS | |
9 class { '::firewall': } | |
10 firewall { '502 - test': | |
11 proto => 'all', | |
12 connmark => '0x1', | |
13 action => reject, | |
14 } | |
15 EOS | |
16 | |
17 apply_manifest(pp, :catch_failures => true) | |
18 end | |
19 | |
20 it 'should contain the rule' do | |
21 shell('iptables-save') do |r| | |
22 expect(r.stdout).to match(/-A INPUT -m comment --comment "502 - test" -m connmark --mark 0x1 -j REJECT --reject-with icmp-port-unreachable/) | |
23 end | |
24 end | |
25 end | |
26 end | |
27 end |