Révision 802d80d1
Allow sourcing sets from Hiera
spec/classes/nftables_spec.rb | ||
---|---|---|
121 | 121 |
} |
122 | 122 |
end |
123 | 123 |
|
124 |
context 'with custom sets' do |
|
125 |
let(:params) do |
|
126 |
{ |
|
127 |
sets: { |
|
128 |
'testset1' => { |
|
129 |
type: 'ipv4_addr', |
|
130 |
gc_interval: 2, |
|
131 |
}, |
|
132 |
'testset2' => { |
|
133 |
type: 'ipv6_addr', |
|
134 |
elements: ['2a02:62:c601::dead:beef'], |
|
135 |
}, |
|
136 |
}, |
|
137 |
} |
|
138 |
end |
|
139 |
|
|
140 |
it { |
|
141 |
is_expected.to contain_nftables__set('testset1').with( |
|
142 |
type: 'ipv4_addr', |
|
143 |
gc_interval: 2, |
|
144 |
table: 'inet-filter', |
|
145 |
) |
|
146 |
} |
|
147 |
it { |
|
148 |
is_expected.to contain_nftables__set('testset2').with( |
|
149 |
type: 'ipv6_addr', |
|
150 |
elements: ['2a02:62:c601::dead:beef'], |
|
151 |
table: 'inet-filter', |
|
152 |
) |
|
153 |
} |
|
154 |
end |
|
155 |
|
|
124 | 156 |
context 'without masking firewalld' do |
125 | 157 |
let(:params) do |
126 | 158 |
{ |
Formats disponibles : Unified diff