Révision c82b960a
rubocop:auto_correct results
spec/classes/rules/out/puppet_spec.rb | ||
---|---|---|
1 |
# frozen_string_literal: true |
|
2 |
|
|
1 | 3 |
require 'spec_helper' |
2 | 4 |
|
3 | 5 |
describe 'nftables::rules::out::puppet' do |
... | ... | |
12 | 14 |
it { is_expected.to compile } |
13 | 15 |
it { is_expected.to contain_nftables__rule('default_out-puppet-0').with_content('ip daddr 1.2.3.4 tcp dport 8140 accept') } |
14 | 16 |
end |
17 |
|
|
15 | 18 |
context 'with different port' do |
16 | 19 |
let(:params) do |
17 | 20 |
super().merge({ puppetserver_port: 8141 }) |
... | ... | |
20 | 23 |
it { is_expected.to compile } |
21 | 24 |
it { is_expected.to contain_nftables__rule('default_out-puppet-0').with_content('ip daddr 1.2.3.4 tcp dport 8141 accept') } |
22 | 25 |
end |
26 |
|
|
23 | 27 |
context 'with ipv6 address' do |
24 | 28 |
let(:params) do |
25 | 29 |
{ puppetserver: 'fe80::1' } |
... | ... | |
28 | 32 |
it { is_expected.to compile } |
29 | 33 |
it { is_expected.to contain_nftables__rule('default_out-puppet-0').with_content('ip6 daddr fe80::1 tcp dport 8140 accept') } |
30 | 34 |
end |
35 |
|
|
31 | 36 |
context 'with ipv6 & ipv4 address' do |
32 | 37 |
let(:params) do |
33 | 38 |
{ puppetserver: ['fe80::1', '1.2.3.4'] } |
Formats disponibles : Unified diff