Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / spec / classes / nftables_spec.rb @ e89da898

Historique | Voir | Annoter | Télécharger (963 octets)

1 64134e4e tr
require 'spec_helper'
2
3
describe 'nftables' do
4
  let(:pre_condition) { 'Exec{path => "/bin"}' }
5
6
  on_supported_os.each do |os, os_facts|
7
    context "on #{os}" do
8
      let(:facts) { os_facts }
9
10
      it { is_expected.to compile }
11 5acb554a tr
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
      )}
36 64134e4e tr
    end
37
  end
38
end