root / spec / classes / nftables_spec.rb @ 8efbdf9a
Historique | Voir | Annoter | Télécharger (963 octets)
1 |
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 |
|
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 |
end
|
37 |
end
|
38 |
end
|