Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • release/8.0-perimetres
  • php84
  • 5.x
  • detached5
  • detached6
  • detached4
  • detached3
  • ll-bug-namedRole
  • release_6.3.0
  • rattrapage_unicaen_auth
  • 6.x
  • detached
  • detached2
  • php82
  • release/1.3.0
  • laminas_migration_bs5
  • ll-migration
  • release-1.2.0
  • 6.4.6
  • 5.1.2
  • 6.4.5
  • 6.4.4
  • 6.4.3
  • 6.4.2
  • 6.4.1
  • 6.4.0
  • 6.3.2
  • 6.3.1
  • 6.3.0
  • 5.1.1
  • 6.2.2
  • 6.2.1
  • 6.2.0
  • 5.1.0
  • 6.1.0
  • 6.0.4
  • 5.0.6
  • 6.0.3
39 results

README.md

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    freeradius_spec.rb 14.17 KiB
    require 'spec_helper'
    
    describe 'freeradius' do
      on_supported_os.each do |os, os_facts|
        context "on #{os}" do
          include_context 'redhat_params'
    
          let(:facts) { os_facts }
    
          # Empty params hash by default so we can super().merge
          let(:params) { {} }
    
          it do
            is_expected.to contain_file('radiusd.conf')
              .with(
                'group'  => 'radiusd',
                'mode'   => '0644',
                'path'   => '/etc/raddb/radiusd.conf',
                'notify' => 'Service[radiusd]',
                'owner'  => 'root',
              )
              .that_requires('Package[freeradius]')
              .that_requires('Group[radiusd]')
          end
    
          it do
            [
              '/etc/raddb/statusclients.d',
              '/etc/raddb',
              '/etc/raddb/conf.d',
              '/etc/raddb/attr.d',
              '/etc/raddb/users.d',
              '/etc/raddb/policy.d',
              '/etc/raddb/dictionary.d',
              '/etc/raddb/scripts',
              '/etc/raddb/mods-config',
              '/etc/raddb/mods-config/attr_filter',
              '/etc/raddb/mods-config/preprocess',
              '/etc/raddb/mods-config/sql',
              '/etc/raddb/sites-available',
              '/etc/raddb/mods-available',
            ].each do |file|
              is_expected.to contain_file(file)
                .with(
                  'ensure'  => 'directory',
                  'group'   => 'radiusd',
                  'mode'    => '0755',
                  'notify'  => 'Service[radiusd]',
                  'owner'   => 'root',
                )
                .that_requires('Package[freeradius]')
                .that_requires('Group[radiusd]')
            end
          end
    
          it do
            [
              '/etc/raddb/certs',
              '/etc/raddb/clients.d',
              '/etc/raddb/listen.d',
              '/etc/raddb/sites-enabled',
              '/etc/raddb/instantiate'
            ].each do |file|
              is_expected.to contain_file(file)
                .with(
                  'ensure'  => 'directory',
                  'group'   => 'radiusd',
                  'mode'    => '0755',
                  'notify'  => 'Service[radiusd]',
                  'owner'   => 'root',