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