root / spec / classes / rules / ceph_mon_spec.rb @ 9d02e9f8
Historique | Voir | Annoter | Télécharger (767 octets)
1 | c82b960a | Steve Traylen | # frozen_string_literal: true
|
---|---|---|---|
2 | |||
3 | f4e9e995 | Dan van der Ster | require 'spec_helper'
|
4 | |||
5 | describe 'nftables::rules::ceph_mon' 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-ceph_mon').with_content('tcp dport {3300, 6789} accept comment "Accept Ceph MON"') } |
||
13 | end
|
||
14 | |||
15 | context 'with ports set' do |
||
16 | let(:params) do |
||
17 | { |
||
18 | ports: [3300, 6790], |
||
19 | } |
||
20 | end
|
||
21 | |||
22 | it { is_expected.to compile } |
||
23 | it { is_expected.to contain_nftables__rule('default_in-ceph_mon').with_content('tcp dport {3300, 6790} accept comment "Accept Ceph MON"') } |
||
24 | end
|
||
25 | end
|
||
26 | end
|
||
27 | end |