root / spec / classes / rules / icinga2_spec.rb @ c94658e1
Historique | Voir | Annoter | Télécharger (667 octets)
1 |
require 'spec_helper'
|
---|---|
2 |
|
3 |
describe 'nftables::rules::icinga2' 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-icinga2').with_content('tcp dport {5665} accept') } |
11 |
end
|
12 |
|
13 |
context 'with ports set' do |
14 |
let(:params) do |
15 |
{ |
16 |
ports: [55, 60], |
17 |
} |
18 |
end
|
19 |
|
20 |
it { is_expected.to compile } |
21 |
it { is_expected.to contain_nftables__rule('default_in-icinga2').with_content('tcp dport {55, 60} accept') } |
22 |
end
|
23 |
end
|
24 |
end
|
25 |
end
|