Révision c82b960a
rubocop:auto_correct results
spec/classes/rules_out_dns_spec.rb | ||
---|---|---|
1 |
# frozen_string_literal: true |
|
2 |
|
|
1 | 3 |
require 'spec_helper' |
2 | 4 |
|
3 | 5 |
describe 'nftables' do |
... | ... | |
15 | 17 |
end |
16 | 18 |
|
17 | 19 |
it { |
18 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-default_out-rule-dnsudp').with(
|
|
19 |
target: 'nftables-inet-filter-chain-default_out',
|
|
20 |
expect(subject).to contain_concat__fragment('nftables-inet-filter-chain-default_out-rule-dnsudp').with(
|
|
21 |
target: 'nftables-inet-filter-chain-default_out', |
|
20 | 22 |
content: %r{^ udp dport 53 accept$}, |
21 |
order: '50-nftables-inet-filter-chain-default_out-rule-dnsudp-b'
|
|
23 |
order: '50-nftables-inet-filter-chain-default_out-rule-dnsudp-b' |
|
22 | 24 |
) |
23 | 25 |
} |
26 |
|
|
24 | 27 |
it { |
25 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-default_out-rule-dnstcp').with(
|
|
26 |
target: 'nftables-inet-filter-chain-default_out',
|
|
28 |
expect(subject).to contain_concat__fragment('nftables-inet-filter-chain-default_out-rule-dnstcp').with(
|
|
29 |
target: 'nftables-inet-filter-chain-default_out', |
|
27 | 30 |
content: %r{^ tcp dport 53 accept$}, |
28 |
order: '50-nftables-inet-filter-chain-default_out-rule-dnstcp-b'
|
|
31 |
order: '50-nftables-inet-filter-chain-default_out-rule-dnstcp-b' |
|
29 | 32 |
) |
30 | 33 |
} |
31 | 34 |
end |
... | ... | |
42 | 45 |
it { is_expected.to compile } |
43 | 46 |
|
44 | 47 |
it { |
45 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-default_out-rule-dnsudp-0').with(
|
|
46 |
target: 'nftables-inet-filter-chain-default_out',
|
|
48 |
expect(subject).to contain_concat__fragment('nftables-inet-filter-chain-default_out-rule-dnsudp-0').with(
|
|
49 |
target: 'nftables-inet-filter-chain-default_out', |
|
47 | 50 |
content: %r{^ ip daddr 192.0.2.1 udp dport 53 accept$}, |
48 |
order: '50-nftables-inet-filter-chain-default_out-rule-dnsudp-0-b'
|
|
51 |
order: '50-nftables-inet-filter-chain-default_out-rule-dnsudp-0-b' |
|
49 | 52 |
) |
50 | 53 |
} |
54 |
|
|
51 | 55 |
it { |
52 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-default_out-rule-dnstcp-0').with(
|
|
53 |
target: 'nftables-inet-filter-chain-default_out',
|
|
56 |
expect(subject).to contain_concat__fragment('nftables-inet-filter-chain-default_out-rule-dnstcp-0').with(
|
|
57 |
target: 'nftables-inet-filter-chain-default_out', |
|
54 | 58 |
content: %r{^ ip daddr 192.0.2.1 tcp dport 53 accept$}, |
55 |
order: '50-nftables-inet-filter-chain-default_out-rule-dnstcp-0-b'
|
|
59 |
order: '50-nftables-inet-filter-chain-default_out-rule-dnstcp-0-b' |
|
56 | 60 |
) |
57 | 61 |
} |
58 | 62 |
|
59 | 63 |
it { |
60 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-default_out-rule-dnsudp-1').with(
|
|
61 |
target: 'nftables-inet-filter-chain-default_out',
|
|
64 |
expect(subject).to contain_concat__fragment('nftables-inet-filter-chain-default_out-rule-dnsudp-1').with(
|
|
65 |
target: 'nftables-inet-filter-chain-default_out', |
|
62 | 66 |
content: %r{^ ip6 daddr 2001:db8::1 udp dport 53 accept$}, |
63 |
order: '50-nftables-inet-filter-chain-default_out-rule-dnsudp-1-b'
|
|
67 |
order: '50-nftables-inet-filter-chain-default_out-rule-dnsudp-1-b' |
|
64 | 68 |
) |
65 | 69 |
} |
70 |
|
|
66 | 71 |
it { |
67 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-default_out-rule-dnstcp-1').with(
|
|
68 |
target: 'nftables-inet-filter-chain-default_out',
|
|
72 |
expect(subject).to contain_concat__fragment('nftables-inet-filter-chain-default_out-rule-dnstcp-1').with(
|
|
73 |
target: 'nftables-inet-filter-chain-default_out', |
|
69 | 74 |
content: %r{^ ip6 daddr 2001:db8::1 tcp dport 53 accept$}, |
70 |
order: '50-nftables-inet-filter-chain-default_out-rule-dnstcp-1-b'
|
|
75 |
order: '50-nftables-inet-filter-chain-default_out-rule-dnstcp-1-b' |
|
71 | 76 |
) |
72 | 77 |
} |
73 | 78 |
end |
Formats disponibles : Unified diff