Projet

Général

Profil

Révision 5acb554a

ID5acb554a8e13dc3443c377bdbe10907420d4faad
Parent 73ef24d3
Enfant 5d3f76a0

Ajouté par tr il y a plus de 4 ans

Write some spec tests for init class

Voir les différences:

spec/classes/nftables_spec.rb
8 8
      let(:facts) { os_facts }
9 9

  
10 10
      it { is_expected.to compile }
11

  
12
      it { is_expected.to contain_package('nftables') }
13

  
14
      it { is_expected.to contain_file('/etc/nftables/puppet.nft').with(
15
        :ensure => 'file',
16
        :owner  => 'root',
17
        :group  => 'root',
18
        :mode   => '0640',
19
        :source => 'puppet:///modules/nftables/config/puppet.nft',
20
      )}
21

  
22
      it { is_expected.to contain_file('/etc/nftables/puppet').with(
23
        :ensure  => 'directory',
24
        :owner   => 'root',
25
        :group   => 'root',
26
        :mode    => '0750',
27
        :purge   => true,
28
        :force   => true,
29
        :recurse => true,
30
      )}
31

  
32
      it { is_expected.to contain_service('nftables').with(
33
        :ensure => 'running',
34
        :enable => true,
35
      )}
11 36
    end
12 37
  end
13 38
end

Formats disponibles : Unified diff