root / spec / classes / rules / out / mdns_spec.rb @ 3016d428
Historique | Voir | Annoter | Télécharger (1,09 ko)
1 |
# frozen_string_literal: true
|
---|---|
2 |
|
3 |
require 'spec_helper'
|
4 |
|
5 |
describe 'nftables::rules::out::mdns' do |
6 |
on_supported_os.each do |os, os_facts|
|
7 |
context "on #{os}" do |
8 |
let :facts do |
9 |
os_facts |
10 |
end
|
11 |
|
12 |
context 'default options' do |
13 |
it { is_expected.to compile.with_all_deps } |
14 |
it { is_expected.to contain_nftables__rule('default_out-mdns_v4').with_content('ip daddr 224.0.0.251 udp dport 5353 accept') } |
15 |
it { is_expected.to contain_nftables__rule('default_out-mdns_v6').with_content('ip6 daddr ff02::fb udp dport 5353 accept') } |
16 |
end
|
17 |
|
18 |
context 'with input interfaces set' do |
19 |
let :params do |
20 |
{ |
21 |
oifname: %w[docker0 eth0], |
22 |
} |
23 |
end
|
24 |
|
25 |
it { is_expected.to compile } |
26 |
it { is_expected.to contain_nftables__rule('default_out-mdns_v4').with_content('oifname { "docker0", "eth0" } ip daddr 224.0.0.251 udp dport 5353 accept') } |
27 |
it { is_expected.to contain_nftables__rule('default_out-mdns_v6').with_content('oifname { "docker0", "eth0" } ip6 daddr ff02::fb udp dport 5353 accept') } |
28 |
end
|
29 |
end
|
30 |
end
|
31 |
end
|