Projet

Général

Profil

Révision e89da898

IDe89da898c0147e69c37c2375e896b94053077fdb
Parent f34dae00
Enfant 8efbdf9a

Ajouté par tr il y a plus de 4 ans

Linting

Voir les différences:

.rubocop.yml
59 59
Style/RegexpLiteral:
60 60
  Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
61 61
  EnforcedStyle: percent_r
62
  Exclude:
63
  - spec/classes/*_spec.rb
62 64
Style/TernaryParentheses:
63 65
  Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
64 66
    on complex expressions for better readability, but seriously consider breaking
spec/classes/filter_spec.rb
1 1
require 'spec_helper'
2 2

  
3 3
describe 'nftables' do
4
  let(:pre_condition) {
5
    <<-EOS
6
    Exec{path => "/bin"}
7
    EOS
8
  }
4
  let(:pre_condition) { 'Exec{path => "/bin"}' }
9 5

  
10 6
  on_supported_os.each do |os, os_facts|
11 7
    context "on #{os}" do
......
20 16
        :mode   => '0640',
21 17
      )}
22 18

  
23
      context "chain input" do
19
      context 'chain input' do
24 20
        it { is_expected.to contain_file('/etc/nftables/puppet/filter-input-chains-50-default_in.nft').with(
25 21
          :ensure => 'file',
26 22
          :owner  => 'root',
......
28 24
          :mode   => '0640',
29 25
        )}
30 26
        it { is_expected.to contain_file('/etc/nftables/puppet/filter-input-chains-50-default_in.nft').with_content(
31
          /^jump default_in$/
27
          /^jump default_in$/,
32 28
        )}
33 29

  
34 30
        it { is_expected.to contain_concat('nftables-chain-filter-default_in').with(
35
          :path           => "/etc/nftables/puppet/filter-chains-default_in.nft",
31
          :path           => '/etc/nftables/puppet/filter-chains-default_in.nft',
36 32
          :owner          => 'root',
37 33
          :group          => 'root',
38 34
          :mode           => '0644',
......
55 51
        )}
56 52
      end
57 53

  
58
      context "chain forward" do
54
      context 'chain forward' do
59 55
        it { is_expected.to contain_file('/etc/nftables/puppet/filter-forward-chains-50-default_fwd.nft').with(
60 56
          :ensure => 'file',
61 57
          :owner  => 'root',
......
63 59
          :mode   => '0640',
64 60
        )}
65 61
        it { is_expected.to contain_file('/etc/nftables/puppet/filter-forward-chains-50-default_fwd.nft').with_content(
66
          /^jump default_fwd$/
62
          /^jump default_fwd$/,
67 63
        )}
68 64

  
69 65
        it { is_expected.to contain_concat('nftables-chain-filter-default_fwd').with(
70
          :path           => "/etc/nftables/puppet/filter-chains-default_fwd.nft",
66
          :path           => '/etc/nftables/puppet/filter-chains-default_fwd.nft',
71 67
          :owner          => 'root',
72 68
          :group          => 'root',
73 69
          :mode           => '0644',
......
85 81
        )}
86 82
      end
87 83

  
88
      context "chain output" do
84
      context 'chain output' do
89 85
        it { is_expected.to contain_file('/etc/nftables/puppet/filter-output-chains-50-default_out.nft').with(
90 86
          :ensure => 'file',
91 87
          :owner  => 'root',
......
93 89
          :mode   => '0640',
94 90
        )}
95 91
        it { is_expected.to contain_file('/etc/nftables/puppet/filter-output-chains-50-default_out.nft').with_content(
96
          /^jump default_out$/
92
          /^jump default_out$/,
97 93
        )}
98 94

  
99 95
        it { is_expected.to contain_concat('nftables-chain-filter-default_out').with(
100
          :path           => "/etc/nftables/puppet/filter-chains-default_out.nft",
96
          :path           => '/etc/nftables/puppet/filter-chains-default_out.nft',
101 97
          :owner          => 'root',
102 98
          :group          => 'root',
103 99
          :mode           => '0644',

Formats disponibles : Unified diff