Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / spec / classes / rules / activemq_spec.rb @ 771b3256

Historique | Voir | Annoter | Télécharger (1,3 ko)

1 771b3256 Nacho Barrientos
require 'spec_helper'
2
3
describe 'nftables::rules::activemq' 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-activemq_tcp').with_content('tcp dport 61616 accept') }
11
        it { is_expected.to contain_nftables__rule('default_in-activemq_udp').with_content('udp dport 61616 accept') }
12
      end
13
14
      context 'with tcp set to false' do
15
        let(:params) do
16
          {
17
            tcp: false,
18
          }
19
        end
20
21
        it { is_expected.to compile }
22
        it { is_expected.not_to contain_nftables__rule('default_in-activemq_tcp').with_content('tcp dport 61616 accept') }
23
        it { is_expected.to contain_nftables__rule('default_in-activemq_udp').with_content('udp dport 61616 accept') }
24
      end
25
26
      context 'with udp set to false' do
27
        let(:params) do
28
          {
29
            udp: false,
30
          }
31
        end
32
33
        it { is_expected.to compile }
34
        it { is_expected.to contain_nftables__rule('default_in-activemq_tcp').with_content('tcp dport 61616 accept') }
35
        it { is_expected.not_to contain_nftables__rule('default_in-activemq_udp').with_content('udp dport 61616 accept') }
36
      end
37
    end
38
  end
39
end