root / spec / defines / rules / masquerade_spec.rb @ 20eaf3c2
Historique | Voir | Annoter | Télécharger (725 octets)
1 | 94a80621 | Steve Traylen | require 'spec_helper'
|
---|---|---|---|
2 | |||
3 | describe 'nftables::rules::masquerade' do |
||
4 | let(:title) { 'foobar' } |
||
5 | fcb79d73 | Ben Morrice | let(:pre_condition) { 'include nftables' } |
6 | 94a80621 | Steve Traylen | |
7 | on_supported_os.each do |os, facts|
|
||
8 | context "on #{os}" do |
||
9 | let(:facts) do |
||
10 | facts |
||
11 | end
|
||
12 | |||
13 | context 'with default parameters' do |
||
14 | it { is_expected.to compile.with_all_deps } |
||
15 | it { is_expected.to contain_nftables__rule('POSTROUTING-foobar').with_content('masquerade') } |
||
16 | end
|
||
17 | context 'with dport specified' do |
||
18 | let(:params) do |
||
19 | { |
||
20 | dport: 1000 |
||
21 | } |
||
22 | end
|
||
23 | |||
24 | it { is_expected.to contain_nftables__rule('POSTROUTING-foobar').with_content('tcp dport 1000 masquerade') } |
||
25 | end
|
||
26 | end
|
||
27 | end
|
||
28 | end |