Révision fa92e118
Pet rubocop
spec/classes/masquerade_spec.rb | ||
---|---|---|
40 | 40 |
owner: 'root', |
41 | 41 |
group: 'root', |
42 | 42 |
mode: '0640', |
43 |
ensure_newline: true,
|
|
43 |
ensure_newline: true |
|
44 | 44 |
) |
45 | 45 |
} |
46 | 46 |
it { |
47 | 47 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-header').with( |
48 | 48 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
49 | 49 |
content: %r{^chain POSTROUTING \{$}, |
50 |
order: '00',
|
|
50 |
order: '00' |
|
51 | 51 |
) |
52 | 52 |
} |
53 | 53 |
it { |
54 | 54 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-type').with( |
55 | 55 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
56 | 56 |
content: %r{^ type nat hook postrouting priority 100$}, |
57 |
order: '01-nftables-ip-nat-chain-POSTROUTING-rule-type-b',
|
|
57 |
order: '01-nftables-ip-nat-chain-POSTROUTING-rule-type-b' |
|
58 | 58 |
) |
59 | 59 |
} |
60 | 60 |
it { |
61 | 61 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-policy').with( |
62 | 62 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
63 | 63 |
content: %r{^ policy accept$}, |
64 |
order: '02-nftables-ip-nat-chain-POSTROUTING-rule-policy-b',
|
|
64 |
order: '02-nftables-ip-nat-chain-POSTROUTING-rule-policy-b' |
|
65 | 65 |
) |
66 | 66 |
} |
67 | 67 |
it { |
68 | 68 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-masquerade_eth0').with( |
69 | 69 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
70 | 70 |
content: %r{^ oifname eth0 masquerade$}, |
71 |
order: '70-nftables-ip-nat-chain-POSTROUTING-rule-masquerade_eth0-b',
|
|
71 |
order: '70-nftables-ip-nat-chain-POSTROUTING-rule-masquerade_eth0-b' |
|
72 | 72 |
) |
73 | 73 |
} |
74 | 74 |
it { |
75 | 75 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-masquerade_eth1_vpn').with( |
76 | 76 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
77 | 77 |
content: %r{^ oifname eth1 ip saddr 192\.0\.2\.0\/24 masquerade$}, |
78 |
order: '70-nftables-ip-nat-chain-POSTROUTING-rule-masquerade_eth1_vpn-b',
|
|
78 |
order: '70-nftables-ip-nat-chain-POSTROUTING-rule-masquerade_eth1_vpn-b' |
|
79 | 79 |
) |
80 | 80 |
} |
81 | 81 |
it { |
82 | 82 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-masquerade_ssh').with( |
83 | 83 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
84 | 84 |
content: %r{^ ip saddr 192\.0\.2\.0\/24 ip daddr 198.51.100.2 tcp dport 22 masquerade$}, |
85 |
order: '70-nftables-ip-nat-chain-POSTROUTING-rule-masquerade_ssh-b',
|
|
85 |
order: '70-nftables-ip-nat-chain-POSTROUTING-rule-masquerade_ssh-b' |
|
86 | 86 |
) |
87 | 87 |
} |
88 | 88 |
it { |
89 | 89 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-masquerade_ssh_gitlab').with( |
90 | 90 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
91 | 91 |
content: %r{^ ip saddr 192\.0\.2\.0\/24 ip daddr 198.51.100.2 tcp dport 22 masquerade$}, |
92 |
order: '70-nftables-ip-nat-chain-POSTROUTING-rule-masquerade_ssh_gitlab-b',
|
|
92 |
order: '70-nftables-ip-nat-chain-POSTROUTING-rule-masquerade_ssh_gitlab-b' |
|
93 | 93 |
) |
94 | 94 |
} |
95 | 95 |
it { |
96 | 96 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-masquerade_wireguard').with( |
97 | 97 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
98 | 98 |
content: %r{^ udp dport 51820 masquerade$}, |
99 |
order: '70-nftables-ip-nat-chain-POSTROUTING-rule-masquerade_wireguard-b',
|
|
99 |
order: '70-nftables-ip-nat-chain-POSTROUTING-rule-masquerade_wireguard-b' |
|
100 | 100 |
) |
101 | 101 |
} |
102 | 102 |
it { |
103 | 103 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-footer').with( |
104 | 104 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
105 | 105 |
content: %r{^\}$}, |
106 |
order: '99',
|
|
106 |
order: '99' |
|
107 | 107 |
) |
108 | 108 |
} |
109 | 109 |
end |
Formats disponibles : Unified diff