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