Révision fa92e118
Pet rubocop
spec/classes/router_spec.rb | ||
---|---|---|
36 | 36 |
owner: 'root', |
37 | 37 |
group: 'root', |
38 | 38 |
mode: '0640', |
39 |
ensure_newline: true,
|
|
39 |
ensure_newline: true |
|
40 | 40 |
) |
41 | 41 |
} |
42 | 42 |
it { |
43 | 43 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-default_fwd-header').with( |
44 | 44 |
target: 'nftables-inet-filter-chain-default_fwd', |
45 | 45 |
content: %r{^chain default_fwd \{$}, |
46 |
order: '00',
|
|
46 |
order: '00' |
|
47 | 47 |
) |
48 | 48 |
} |
49 | 49 |
it { |
50 | 50 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-default_fwd-rule-out').with( |
51 | 51 |
target: 'nftables-inet-filter-chain-default_fwd', |
52 | 52 |
content: %r{^ iifname eth1 oifname eth0 accept$}, |
53 |
order: '20-nftables-inet-filter-chain-default_fwd-rule-out-b',
|
|
53 |
order: '20-nftables-inet-filter-chain-default_fwd-rule-out-b' |
|
54 | 54 |
) |
55 | 55 |
} |
56 | 56 |
it { |
57 | 57 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-default_fwd-rule-drop').with( |
58 | 58 |
target: 'nftables-inet-filter-chain-default_fwd', |
59 | 59 |
content: %r{^ iifname eth0 drop$}, |
60 |
order: '90-nftables-inet-filter-chain-default_fwd-rule-drop-b',
|
|
60 |
order: '90-nftables-inet-filter-chain-default_fwd-rule-drop-b' |
|
61 | 61 |
) |
62 | 62 |
} |
63 | 63 |
it { |
64 | 64 |
is_expected.to contain_concat__fragment('nftables-inet-filter-chain-default_fwd-footer').with( |
65 | 65 |
target: 'nftables-inet-filter-chain-default_fwd', |
66 | 66 |
content: %r{^\}$}, |
67 |
order: '99',
|
|
67 |
order: '99' |
|
68 | 68 |
) |
69 | 69 |
} |
70 | 70 |
|
... | ... | |
74 | 74 |
owner: 'root', |
75 | 75 |
group: 'root', |
76 | 76 |
mode: '0640', |
77 |
ensure_newline: true,
|
|
77 |
ensure_newline: true |
|
78 | 78 |
) |
79 | 79 |
} |
80 | 80 |
it { |
81 | 81 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-header').with( |
82 | 82 |
target: 'nftables-ip-nat-chain-PREROUTING', |
83 | 83 |
content: %r{^chain PREROUTING \{$}, |
84 |
order: '00',
|
|
84 |
order: '00' |
|
85 | 85 |
) |
86 | 86 |
} |
87 | 87 |
it { |
88 | 88 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-rule-type').with( |
89 | 89 |
target: 'nftables-ip-nat-chain-PREROUTING', |
90 | 90 |
content: %r{^ type nat hook prerouting priority -100$}, |
91 |
order: '01-nftables-ip-nat-chain-PREROUTING-rule-type-b',
|
|
91 |
order: '01-nftables-ip-nat-chain-PREROUTING-rule-type-b' |
|
92 | 92 |
) |
93 | 93 |
} |
94 | 94 |
it { |
95 | 95 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-rule-policy').with( |
96 | 96 |
target: 'nftables-ip-nat-chain-PREROUTING', |
97 | 97 |
content: %r{^ policy accept$}, |
98 |
order: '02-nftables-ip-nat-chain-PREROUTING-rule-policy-b',
|
|
98 |
order: '02-nftables-ip-nat-chain-PREROUTING-rule-policy-b' |
|
99 | 99 |
) |
100 | 100 |
} |
101 | 101 |
it { |
102 | 102 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-footer').with( |
103 | 103 |
target: 'nftables-ip-nat-chain-PREROUTING', |
104 | 104 |
content: %r{^\}$}, |
105 |
order: '99',
|
|
105 |
order: '99' |
|
106 | 106 |
) |
107 | 107 |
} |
108 | 108 |
|
... | ... | |
112 | 112 |
owner: 'root', |
113 | 113 |
group: 'root', |
114 | 114 |
mode: '0640', |
115 |
ensure_newline: true,
|
|
115 |
ensure_newline: true |
|
116 | 116 |
) |
117 | 117 |
} |
118 | 118 |
it { |
119 | 119 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-header').with( |
120 | 120 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
121 | 121 |
content: %r{^chain POSTROUTING \{$}, |
122 |
order: '00',
|
|
122 |
order: '00' |
|
123 | 123 |
) |
124 | 124 |
} |
125 | 125 |
it { |
126 | 126 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-type').with( |
127 | 127 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
128 | 128 |
content: %r{^ type nat hook postrouting priority 100$}, |
129 |
order: '01-nftables-ip-nat-chain-POSTROUTING-rule-type-b',
|
|
129 |
order: '01-nftables-ip-nat-chain-POSTROUTING-rule-type-b' |
|
130 | 130 |
) |
131 | 131 |
} |
132 | 132 |
it { |
133 | 133 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-policy').with( |
134 | 134 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
135 | 135 |
content: %r{^ policy accept$}, |
136 |
order: '02-nftables-ip-nat-chain-POSTROUTING-rule-policy-b',
|
|
136 |
order: '02-nftables-ip-nat-chain-POSTROUTING-rule-policy-b' |
|
137 | 137 |
) |
138 | 138 |
} |
139 | 139 |
it { |
140 | 140 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-masquerade').with( |
141 | 141 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
142 | 142 |
content: %r{^ oifname eth0 masquerade$}, |
143 |
order: '20-nftables-ip-nat-chain-POSTROUTING-rule-masquerade-b',
|
|
143 |
order: '20-nftables-ip-nat-chain-POSTROUTING-rule-masquerade-b' |
|
144 | 144 |
) |
145 | 145 |
} |
146 | 146 |
it { |
147 | 147 |
is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-footer').with( |
148 | 148 |
target: 'nftables-ip-nat-chain-POSTROUTING', |
149 | 149 |
content: %r{^\}$}, |
150 |
order: '99',
|
|
150 |
order: '99' |
|
151 | 151 |
) |
152 | 152 |
} |
153 | 153 |
end |
Formats disponibles : Unified diff