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/snat4_spec.rb
41 41
            owner:          'root',
42 42
            group:          'root',
43 43
            mode:           '0640',
44
            ensure_newline: true,
44
            ensure_newline: true
45 45
          )
46 46
        }
47 47
        it {
48 48
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-header').with(
49 49
            target:  'nftables-ip-nat-chain-POSTROUTING',
50 50
            content: %r{^chain POSTROUTING \{$},
51
            order:   '00',
51
            order:   '00'
52 52
          )
53 53
        }
54 54
        it {
55 55
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-type').with(
56 56
            target:  'nftables-ip-nat-chain-POSTROUTING',
57 57
            content: %r{^  type nat hook postrouting priority 100$},
58
            order:   '01-nftables-ip-nat-chain-POSTROUTING-rule-type-b',
58
            order:   '01-nftables-ip-nat-chain-POSTROUTING-rule-type-b'
59 59
          )
60 60
        }
61 61
        it {
62 62
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-policy').with(
63 63
            target:  'nftables-ip-nat-chain-POSTROUTING',
64 64
            content: %r{^  policy accept$},
65
            order:   '02-nftables-ip-nat-chain-POSTROUTING-rule-policy-b',
65
            order:   '02-nftables-ip-nat-chain-POSTROUTING-rule-policy-b'
66 66
          )
67 67
        }
68 68
        it {
69 69
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-static').with(
70 70
            target:  'nftables-ip-nat-chain-POSTROUTING',
71 71
            content: %r{^  oifname eth0 snat 198\.51\.100\.1$},
72
            order:   '60-nftables-ip-nat-chain-POSTROUTING-rule-static-b',
72
            order:   '60-nftables-ip-nat-chain-POSTROUTING-rule-static-b'
73 73
          )
74 74
        }
75 75
        it {
76 76
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-1_1').with(
77 77
            target:  'nftables-ip-nat-chain-POSTROUTING',
78 78
            content: %r{^  oifname eth0 ip saddr 192\.0\.2\.2 snat 198\.51\.100\.3$},
79
            order:   '61-nftables-ip-nat-chain-POSTROUTING-rule-1_1-b',
79
            order:   '61-nftables-ip-nat-chain-POSTROUTING-rule-1_1-b'
80 80
          )
81 81
        }
82 82
        it {
83 83
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-1_1_smtp').with(
84 84
            target:  'nftables-ip-nat-chain-POSTROUTING',
85 85
            content: %r{^  ip saddr 192\.0\.2\.2 tcp dport 25 snat 198\.51\.100\.2$},
86
            order:   '70-nftables-ip-nat-chain-POSTROUTING-rule-1_1_smtp-b',
86
            order:   '70-nftables-ip-nat-chain-POSTROUTING-rule-1_1_smtp-b'
87 87
          )
88 88
        }
89 89
        it {
90 90
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-1_1_wireguard').with(
91 91
            target:  'nftables-ip-nat-chain-POSTROUTING',
92 92
            content: %r{^  ip saddr 192\.0\.2\.2 udp dport 51820 snat 198\.51\.100\.2$},
93
            order:   '70-nftables-ip-nat-chain-POSTROUTING-rule-1_1_wireguard-b',
93
            order:   '70-nftables-ip-nat-chain-POSTROUTING-rule-1_1_wireguard-b'
94 94
          )
95 95
        }
96 96
        it {
97 97
          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-footer').with(
98 98
            target:  'nftables-ip-nat-chain-POSTROUTING',
99 99
            content: %r{^\}$},
100
            order:   '99',
100
            order:   '99'
101 101
          )
102 102
        }
103 103
      end

Formats disponibles : Unified diff