root / spec / classes / rules / ssh_spec.rb @ fa92e118
Historique | Voir | Annoter | Télécharger (653 octets)
1 | 94a80621 | Steve Traylen | require 'spec_helper'
|
---|---|---|---|
2 | |||
3 | describe 'nftables::rules::ssh' 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-ssh').with_content('tcp dport {22} 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-ssh').with_content('tcp dport {55, 60} accept') } |
||
22 | end
|
||
23 | end
|
||
24 | end
|
||
25 | end |