Projet

Général

Profil

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

root / spec / classes / rules / pxp_agent_spec.rb @ 51850192

Historique | Voir | Annoter | Télécharger (961 octets)

1 7f74df2e Tim Meusel
# frozen_string_literal: true
2
3
require 'spec_helper'
4
5
describe 'nftables::rules::pxp_agent' 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.with_all_deps }
12
        it { is_expected.to contain_nftables__rule('default_in-pxp_agent').with_content('tcp dport {8142} accept') }
13
        it { is_expected.to contain_concat__fragment('nftables-inet-filter-chain-default_in-rule-pxp_agent') }
14
        it { is_expected.to contain_concat__fragment('nftables-inet-filter-chain-default_in-rule-pxp_agent_header') }
15
      end
16
17
      context 'with ports set' do
18
        let(:params) do
19
          {
20
            ports: [55, 60],
21
          }
22
        end
23
24
        it { is_expected.to compile.with_all_deps }
25
        it { is_expected.to contain_nftables__rule('default_in-pxp_agent').with_content('tcp dport {55, 60} accept') }
26
      end
27
    end
28
  end
29
end