root / spec / classes / rules / afs3_callback_spec.rb @ 03d9e7da
Historique | Voir | Annoter | Télécharger (922 octets)
1 |
require 'spec_helper'
|
---|---|
2 |
|
3 |
describe 'nftables::rules::afs3_callback' do |
4 |
on_supported_os.each do |os, os_facts|
|
5 |
context "on #{os}" do |
6 |
let(:facts) { os_facts }
|
7 |
|
8 |
context 'default options' do |
9 |
it { is_expected.to compile } |
10 |
it { is_expected.to contain_nftables__rule('default_in-afs3_callback') }
|
11 |
it { is_expected.to contain_nftables__rule('default_in-afs3_callback').with_content('ip saddr { 0.0.0.0/0 } udp dport 7001 accept') } |
12 |
end
|
13 |
|
14 |
context 'with saddr set' do |
15 |
let(:params) do |
16 |
{ |
17 |
saddr: ['192.168.0.0/16', '1.2.3.4'], |
18 |
} |
19 |
end
|
20 |
|
21 |
it { is_expected.to compile } |
22 |
it { is_expected.to contain_nftables__rule('default_in-afs3_callback') }
|
23 |
it { is_expected.to contain_nftables__rule('default_in-afs3_callback').with_content('ip saddr { 192.168.0.0/16, 1.2.3.4 } udp dport 7001 accept') } |
24 |
end
|
25 |
end
|
26 |
end
|
27 |
end
|