Révision d43ced4d
Implement nftables:;simplerule::counter
spec/defines/simplerule_spec.rb | ||
---|---|---|
35 | 35 |
{ |
36 | 36 |
action: 'accept', |
37 | 37 |
comment: 'this is my rule', |
38 |
counter: true, |
|
38 | 39 |
dport: 333, |
39 | 40 |
proto: 'udp', |
40 | 41 |
chain: 'default_out', |
... | ... | |
45 | 46 |
it { is_expected.to compile } |
46 | 47 |
it { |
47 | 48 |
is_expected.to contain_nftables__rule('default_out-my_big_rule').with( |
48 |
content: 'udp dport 333 ip6 daddr 2001:1458::/32 accept comment "this is my rule"', |
|
49 |
content: 'udp dport 333 ip6 daddr 2001:1458::/32 counter accept comment "this is my rule"',
|
|
49 | 50 |
order: '50', |
50 | 51 |
) |
51 | 52 |
} |
... | ... | |
178 | 179 |
} |
179 | 180 |
end |
180 | 181 |
|
182 |
describe 'with counter enabled' do |
|
183 |
let(:params) do |
|
184 |
{ |
|
185 |
counter: true, |
|
186 |
} |
|
187 |
end |
|
188 |
|
|
189 |
it { is_expected.to compile } |
|
190 |
it { |
|
191 |
is_expected.to contain_nftables__rule('default_in-my_default_rule_name').with( |
|
192 |
content: 'counter accept', |
|
193 |
) |
|
194 |
} |
|
195 |
end |
|
181 | 196 |
end |
182 | 197 |
end |
183 | 198 |
end |
Formats disponibles : Unified diff