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