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/defines/chain_spec.rb
22 22
          owner: 'root',
23 23
          group: 'root',
24 24
          mode: '0640',
25
          ensure_newline: true,
25
          ensure_newline: true
26 26
        )
27 27
      }
28 28
      it {
......
31 31
          source: '/etc/nftables/puppet-preflight/inet-filter-chain-MYCHAIN.nft',
32 32
          mode: '0640',
33 33
          owner: 'root',
34
          group: 'root',
34
          group: 'root'
35 35
        )
36 36
      }
37 37
      it {
38 38
        is_expected.to contain_concat__fragment('nftables-inet-filter-chain-MYCHAIN-header').with(
39 39
          order: '00',
40 40
          content: "# Start of fragment order:00 MYCHAIN header\nchain MYCHAIN {",
41
          target: 'nftables-inet-filter-chain-MYCHAIN',
41
          target: 'nftables-inet-filter-chain-MYCHAIN'
42 42
        )
43 43
      }
44 44
      it {
45 45
        is_expected.to contain_concat__fragment('nftables-inet-filter-chain-MYCHAIN-footer').with(
46 46
          order: '99',
47 47
          content: "# Start of fragment order:99 MYCHAIN footer\n}",
48
          target: 'nftables-inet-filter-chain-MYCHAIN',
48
          target: 'nftables-inet-filter-chain-MYCHAIN'
49 49
        )
50 50
      }
51 51

  
......
62 62
            owner: 'root',
63 63
            group: 'root',
64 64
            mode: '0640',
65
            ensure_newline: true,
65
            ensure_newline: true
66 66
          )
67 67
        }
68 68
        it {
......
71 71
            source: '/etc/nftables/puppet-preflight/ip6-foo-chain-MYCHAIN.nft',
72 72
            mode: '0640',
73 73
            owner: 'root',
74
            group: 'root',
74
            group: 'root'
75 75
          )
76 76
        }
77 77
        it {
78 78
          is_expected.to contain_concat__fragment('nftables-ip6-foo-chain-MYCHAIN-header').with(
79 79
            order: '00',
80 80
            content: "# Start of fragment order:00 MYCHAIN header\nchain MYCHAIN {",
81
            target: 'nftables-ip6-foo-chain-MYCHAIN',
81
            target: 'nftables-ip6-foo-chain-MYCHAIN'
82 82
          )
83 83
        }
84 84
        it {
85 85
          is_expected.to contain_concat__fragment('nftables-ip6-foo-chain-MYCHAIN-footer').with(
86 86
            order: '99',
87 87
            content: "# Start of fragment order:99 MYCHAIN footer\n}",
88
            target: 'nftables-ip6-foo-chain-MYCHAIN',
88
            target: 'nftables-ip6-foo-chain-MYCHAIN'
89 89
          )
90 90
        }
91 91
      end
......
100 100
        it {
101 101
          is_expected.to contain_nftables__rule('foobar-jump_MYCHAIN').with(
102 102
            order: '22',
103
            content: 'jump MYCHAIN',
103
            content: 'jump MYCHAIN'
104 104
          )
105 105
        }
106 106
        context 'with inject_oif set to alpha and inject_oif set to beta' do
......
111 111
          it {
112 112
            is_expected.to contain_nftables__rule('foobar-jump_MYCHAIN').with(
113 113
              order: '22',
114
              content: 'iifname alpha oifname beta jump MYCHAIN',
114
              content: 'iifname alpha oifname beta jump MYCHAIN'
115 115
            )
116 116
          }
117 117
        end

Formats disponibles : Unified diff