Projet

Général

Profil

Révision 37b2a3b7

ID37b2a3b75aefe0d3694f82eaf77c00f588ac1b9e
Parent 43566263
Enfant 0cf43fdf

Ajouté par Nacho Barrientos il y a plus de 4 ans

Add class nftables::services::dhcpv6_client

Voir les différences:

manifests/services/dhcpv6_client.pp
1
class nftables::services::dhcpv6_client inherits nftables {
2
  if $nftables::out_all {
3
    fail('All outgoing traffic is allowed, you might want to use only nftables::rules::dhcpv6_client')
4
  }
5

  
6
  include nftables::rules::dhcpv6_client
7
  include nftables::rules::out::dhcpv6_client
8
}
spec/classes/services/dhcpv6_client_spec.rb
1
require 'spec_helper'
2

  
3
describe 'nftables::services::dhcpv6_client' do
4
  on_supported_os.each do |os, os_facts|
5
    context "on #{os}" do
6
      let(:facts) { os_facts }
7

  
8
      context 'normal behaviour' do
9
        it { is_expected.to compile }
10
        it { is_expected.to contain_class('nftables::rules::dhcpv6_client') }
11
        it { is_expected.to contain_class('nftables::rules::out::dhcpv6_client') }
12
      end
13

  
14
      context 'out_all enabled' do
15
        let(:pre_condition) { 'class{\'nftables\': out_all => true}' }
16

  
17
        it { is_expected.not_to compile }
18
      end
19
    end
20
  end
21
end

Formats disponibles : Unified diff