root / spec / classes / rules / samba_spec.rb @ 8cdd24a5
Historique | Voir | Annoter | Télécharger (1,14 ko)
1 |
# frozen_string_literal: true
|
---|---|
2 |
|
3 |
require 'spec_helper'
|
4 |
|
5 |
describe 'nftables::rules::samba' 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-netbios_tcp').with_content('tcp dport {139,445} accept') } |
13 |
it { is_expected.to contain_nftables__rule('default_in-netbios_udp').with_content('udp dport {137,138} accept') } |
14 |
it { is_expected.not_to contain_nftables__rule('default_in-ctdb').with_content('tcp dport 4379 accept') } |
15 |
end
|
16 |
|
17 |
context 'with ctdb set' do |
18 |
let(:params) do |
19 |
{ |
20 |
ctdb: true, |
21 |
} |
22 |
end
|
23 |
|
24 |
it { is_expected.to compile } |
25 |
it { is_expected.to contain_nftables__rule('default_in-netbios_tcp').with_content('tcp dport {139,445} accept') } |
26 |
it { is_expected.to contain_nftables__rule('default_in-netbios_udp').with_content('udp dport {137,138} accept') } |
27 |
it { is_expected.to contain_nftables__rule('default_in-ctdb').with_content('tcp dport 4379 accept') } |
28 |
end
|
29 |
end
|
30 |
end
|
31 |
end
|