Projet

Général

Profil

Révision 0b2ccdda

ID0b2ccdda996b26f792c1e2807508f0154e1c4307
Parent c6941cfe
Enfant 3016d428

Ajouté par canihavethisone il y a 10 mois

Fix typos

Voir les différences:

manifests/init.pp
237 237
    exec { 'nftables_running_state_check':
238 238
      command => 'echo "reloading nftables"',
239 239
      path    => ['/usr/sbin', '/sbin', '/usr/bin', '/bin'],
240
      unless  => "/usr/bin/test -s /var/tmp/nftables_hash -a \"$(nft -s list ruleset | sha1sum)\" = \"$(cat ${inmem_rules_hash_file})\"",
240
      unless  => "/usr/bin/test -s ${inmem_rules_hash_file} -a \"$(nft -s list ruleset | sha1sum)\" = \"$(cat ${inmem_rules_hash_file})\"",
241 241
      notify  => Service['nftables'],
242 242
    }
243 243

  
244 244
    # Generate nftables_hash upon any changes from the nftables service 
245
    exec { 'generate_nftables_hash':
245
    exec { 'nftables_generate_hash':
246 246
      command     => "nft -s list ruleset | sha1sum > ${inmem_rules_hash_file}",
247 247
      path        => ['/usr/sbin', '/sbin', '/usr/bin', '/bin'],     
248 248
      subscribe   => Service['nftables'],
spec/classes/nftables_spec.rb
135 135
      }
136 136

  
137 137
      it {
138
        expect(subject).not_to contain_exec('generate_ntfables_hash')
138
        expect(subject).not_to contain_exec('nftables_generate_hash')
139 139
      }
140 140

  
141 141
      it {
......
323 323
          is_expected.to contain_exec('nftables_running_state_check').with(
324 324
            command: %r{^echo "reloading nftables"$},
325 325
            notify: 'Service[nftables]',
326
            unless: %r{^/usr/bin/test -s /var/tmp/nftables_hash -a "\$\(nft -s list ruleset \| sha1sum\)" = "\$\(cat /foo/bar\)"$}
326
            unless: %r{^/usr/bin/test -s /foo/bar -a "\$\(nft -s list ruleset \| sha1sum\)" = "\$\(cat /foo/bar\)"$}
327 327
          )
328 328
        }
329 329
        it {
330
          is_expected.to contain_exec('generate_nftables_hash').with(
330
          is_expected.to contain_exec('nftables_generate_hash').with(
331 331
            command: %r{^nft -s list ruleset \| sha1sum > /foo/bar$},
332 332
            subscribe: 'Service[nftables]',
333 333
            refreshonly: true,

Formats disponibles : Unified diff