root / spec / classes / rules / llmnr_spec.rb @ 9d02e9f8
Historique | Voir | Annoter | Télécharger (1,17 ko)
1 |
# frozen_string_literal: true
|
---|---|
2 |
|
3 |
require 'spec_helper'
|
4 |
|
5 |
describe 'nftables::rules::llmnr' 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_in-llmnr_v4').with_content('ip daddr 224.0.0.252 udp dport 5355 accept comment "allow LLMNR"') } |
15 |
it { is_expected.to contain_nftables__rule('default_in-llmnr_v6').with_content('ip6 daddr ff02::1:3 udp dport 5355 accept comment "allow LLMNR"') } |
16 |
end
|
17 |
|
18 |
context 'with input interfaces set' do |
19 |
let :params do |
20 |
{ |
21 |
iifname: %w[docker0 eth0], |
22 |
} |
23 |
end
|
24 |
|
25 |
it { is_expected.to compile } |
26 |
it { is_expected.to contain_nftables__rule('default_in-llmnr_v4').with_content('iifname { "docker0", "eth0" } ip daddr 224.0.0.252 udp dport 5355 accept comment "allow LLMNR"') } |
27 |
it { is_expected.to contain_nftables__rule('default_in-llmnr_v6').with_content('iifname { "docker0", "eth0" } ip6 daddr ff02::1:3 udp dport 5355 accept comment "allow LLMNR"') } |
28 |
end
|
29 |
end
|
30 |
end
|
31 |
end
|