Projet

Général

Profil

Révision fa92e118

IDfa92e118453b036b60b20ff1f703687f4d63af77
Parent 5fea281f
Enfant 9ea14bc0

Ajouté par Romain Tartière il y a plus de 3 ans

Pet rubocop

Voir les différences:

spec/classes/ip_nat_spec.rb
15 15
          ensure: 'present',
16 16
          owner:  'root',
17 17
          group:  'root',
18
          mode:   '0640',
18
          mode:   '0640'
19 19
        )
20 20
      }
21 21

  
......
23 23
        is_expected.to contain_concat__fragment('nftables-ip-nat-header').with(
24 24
          target:  'nftables-ip-nat',
25 25
          content: %r{^table ip nat \{$},
26
          order:   '00',
26
          order:   '00'
27 27
        )
28 28
      }
29 29

  
......
31 31
        is_expected.to contain_concat__fragment('nftables-ip-nat-body').with(
32 32
          target:  'nftables-ip-nat',
33 33
          content: %r{^\s+include "ip-nat-chain-\*\.nft"$},
34
          order:   '98',
34
          order:   '98'
35 35
        )
36 36
      }
37 37

  
......
39 39
        is_expected.to contain_concat__fragment('nftables-ip-nat-footer').with(
40 40
          target:  'nftables-ip-nat',
41 41
          content: %r{^\}$},
42
          order:   '99',
42
          order:   '99'
43 43
        )
44 44
      }
45 45

  
......
49 49
          ensure: 'present',
50 50
          owner:  'root',
51 51
          group:  'root',
52
          mode:   '0640',
52
          mode:   '0640'
53 53
        )
54 54
      }
55 55

  
......
57 57
        is_expected.to contain_concat__fragment('nftables-ip6-nat-header').with(
58 58
          target:  'nftables-ip6-nat',
59 59
          content: %r{^table ip6 nat \{$},
60
          order:   '00',
60
          order:   '00'
61 61
        )
62 62
      }
63 63

  
......
65 65
        is_expected.to contain_concat__fragment('nftables-ip6-nat-body').with(
66 66
          target:  'nftables-ip6-nat',
67 67
          content: %r{^\s+include "ip6-nat-chain-\*\.nft"$},
68
          order:   '98',
68
          order:   '98'
69 69
        )
70 70
      }
71 71

  
......
73 73
        is_expected.to contain_concat__fragment('nftables-ip6-nat-footer').with(
74 74
          target:  'nftables-ip6-nat',
75 75
          content: %r{^\}$},
76
          order:   '99',
76
          order:   '99'
77 77
        )
78 78
      }
79 79

  
......
84 84
            owner:          'root',
85 85
            group:          'root',
86 86
            mode:           '0640',
87
            ensure_newline: true,
87
            ensure_newline: true
88 88
          )
89 89
        }
90 90
        it {
91 91
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-header').with(
92 92
            target:  'nftables-ip-nat-chain-PREROUTING',
93 93
            content: %r{^chain PREROUTING \{$},
94
            order:   '00',
94
            order:   '00'
95 95
          )
96 96
        }
97 97
        it {
98 98
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-rule-type').with(
99 99
            target:  'nftables-ip-nat-chain-PREROUTING',
100 100
            content: %r{^  type nat hook prerouting priority -100$},
101
            order:   '01-nftables-ip-nat-chain-PREROUTING-rule-type-b',
101
            order:   '01-nftables-ip-nat-chain-PREROUTING-rule-type-b'
102 102
          )
103 103
        }
104 104
        it {
105 105
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-rule-policy').with(
106 106
            target:  'nftables-ip-nat-chain-PREROUTING',
107 107
            content: %r{^  policy accept$},
108
            order:   '02-nftables-ip-nat-chain-PREROUTING-rule-policy-b',
108
            order:   '02-nftables-ip-nat-chain-PREROUTING-rule-policy-b'
109 109
          )
110 110
        }
111 111
        it {
112 112
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-footer').with(
113 113
            target:  'nftables-ip-nat-chain-PREROUTING',
114 114
            content: %r{^\}$},
115
            order:   '99',
115
            order:   '99'
116 116
          )
117 117
        }
118 118
      end
......
124 124
            owner:          'root',
125 125
            group:          'root',
126 126
            mode:           '0640',
127
            ensure_newline: true,
127
            ensure_newline: true
128 128
          )
129 129
        }
130 130
        it {
131 131
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-header').with(
132 132
            target:  'nftables-ip-nat-chain-POSTROUTING',
133 133
            content: %r{^chain POSTROUTING \{$},
134
            order:   '00',
134
            order:   '00'
135 135
          )
136 136
        }
137 137
        it {
138 138
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-type').with(
139 139
            target:  'nftables-ip-nat-chain-POSTROUTING',
140 140
            content: %r{^  type nat hook postrouting priority 100$},
141
            order:   '01-nftables-ip-nat-chain-POSTROUTING-rule-type-b',
141
            order:   '01-nftables-ip-nat-chain-POSTROUTING-rule-type-b'
142 142
          )
143 143
        }
144 144
        it {
145 145
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-policy').with(
146 146
            target:  'nftables-ip-nat-chain-POSTROUTING',
147 147
            content: %r{^  policy accept$},
148
            order:   '02-nftables-ip-nat-chain-POSTROUTING-rule-policy-b',
148
            order:   '02-nftables-ip-nat-chain-POSTROUTING-rule-policy-b'
149 149
          )
150 150
        }
151 151
        it {
152 152
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-footer').with(
153 153
            target:  'nftables-ip-nat-chain-POSTROUTING',
154 154
            content: %r{^\}$},
155
            order:   '99',
155
            order:   '99'
156 156
          )
157 157
        }
158 158
      end
......
164 164
            owner:          'root',
165 165
            group:          'root',
166 166
            mode:           '0640',
167
            ensure_newline: true,
167
            ensure_newline: true
168 168
          )
169 169
        }
170 170
        it {
171 171
          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-PREROUTING6-header').with(
172 172
            target:  'nftables-ip6-nat-chain-PREROUTING6',
173 173
            content: %r{^chain PREROUTING6 \{$},
174
            order:   '00',
174
            order:   '00'
175 175
          )
176 176
        }
177 177
        it {
178 178
          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-PREROUTING6-rule-type').with(
179 179
            target:  'nftables-ip6-nat-chain-PREROUTING6',
180 180
            content: %r{^  type nat hook prerouting priority -100$},
181
            order:   '01-nftables-ip6-nat-chain-PREROUTING6-rule-type-b',
181
            order:   '01-nftables-ip6-nat-chain-PREROUTING6-rule-type-b'
182 182
          )
183 183
        }
184 184
        it {
185 185
          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-PREROUTING6-rule-policy').with(
186 186
            target:  'nftables-ip6-nat-chain-PREROUTING6',
187 187
            content: %r{^  policy accept$},
188
            order:   '02-nftables-ip6-nat-chain-PREROUTING6-rule-policy-b',
188
            order:   '02-nftables-ip6-nat-chain-PREROUTING6-rule-policy-b'
189 189
          )
190 190
        }
191 191
        it {
192 192
          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-PREROUTING6-footer').with(
193 193
            target:  'nftables-ip6-nat-chain-PREROUTING6',
194 194
            content: %r{^\}$},
195
            order:   '99',
195
            order:   '99'
196 196
          )
197 197
        }
198 198
      end
......
204 204
            owner:          'root',
205 205
            group:          'root',
206 206
            mode:           '0640',
207
            ensure_newline: true,
207
            ensure_newline: true
208 208
          )
209 209
        }
210 210
        it {
211 211
          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-POSTROUTING6-header').with(
212 212
            target:  'nftables-ip6-nat-chain-POSTROUTING6',
213 213
            content: %r{^chain POSTROUTING6 \{$},
214
            order:   '00',
214
            order:   '00'
215 215
          )
216 216
        }
217 217
        it {
218 218
          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-POSTROUTING6-rule-type').with(
219 219
            target:  'nftables-ip6-nat-chain-POSTROUTING6',
220 220
            content: %r{^  type nat hook postrouting priority 100$},
221
            order:   '01-nftables-ip6-nat-chain-POSTROUTING6-rule-type-b',
221
            order:   '01-nftables-ip6-nat-chain-POSTROUTING6-rule-type-b'
222 222
          )
223 223
        }
224 224
        it {
225 225
          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-POSTROUTING6-rule-policy').with(
226 226
            target:  'nftables-ip6-nat-chain-POSTROUTING6',
227 227
            content: %r{^  policy accept$},
228
            order:   '02-nftables-ip6-nat-chain-POSTROUTING6-rule-policy-b',
228
            order:   '02-nftables-ip6-nat-chain-POSTROUTING6-rule-policy-b'
229 229
          )
230 230
        }
231 231
        it {
232 232
          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-POSTROUTING6-footer').with(
233 233
            target:  'nftables-ip6-nat-chain-POSTROUTING6',
234 234
            content: %r{^\}$},
235
            order:   '99',
235
            order:   '99'
236 236
          )
237 237
        }
238 238
      end
......
251 251
            ensure: 'present',
252 252
            owner:  'root',
253 253
            group:  'root',
254
            mode:   '0640',
254
            mode:   '0640'
255 255
          )
256 256
        }
257 257
      end

Formats disponibles : Unified diff