Skip to content
Snippets Groups Projects
Select Git revision
  • 70d6c6909c2d41f700384e8a85697ea0c507fed6
  • master default protected
  • main
  • update_github_actions
  • 144_rocky8_support
  • 195-update-pdk-to-300
  • 144-rocky8
  • add_test_github_test_workflow
  • pdk_2.4.0
  • fix_unclosed_let_block_in_defines_client_spec
  • validation_fixes
  • freeradius_3_0_21_config_updates
  • data_types
  • PrepareBuster
  • travis
  • 4.0.1
  • 4.0.0
  • 3.9.2
  • 3.9.1
  • 3.9.0
  • 3.8.2
  • 3.8.1
  • 3.8.0
  • 3.7.0
  • 3.6.0
  • 3.5.0
  • 3.4.3
  • 3.4.2
  • 3.4.1
  • 3.4.0
  • 3.3.0
  • 3.2.0
  • 3.1.0
  • 3.0.0
  • 2.3.1
35 results

ldap_spec.rb

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ldap_spec.rb 1.10 KiB
    require 'spec_helper'
    
    describe 'freeradius::ldap' do
      include_context 'redhat_common_dependencies'
    
      let(:title) { 'test' }
    
      let(:params) do
        {
          identity: 'cn=root,dc=example,dc=com',
          password: 'test password',
          basedn: 'dc=example,dc=com',
          server: ['localhost'],
        }
      end
    
      let(:facts) do
        {
          freeradius_version: '3.0.21',
        }
      end
    
      it do
        is_expected.to contain_file('/etc/raddb/mods-available/test')
          .with_content(%r{^ldap test \{\n})
          .with_content(%r{^\s+server = 'localhost'\n})
          .with_content(%r{^\s+identity = 'cn=root,dc=example,dc=com'\n})
          .with_content(%r{^\s+password = 'test password'\n})
          .with_content(%r{^\s+base_dn = 'dc=example,dc=com'\n})
          .with_ensure('present')
          .with_group('radiusd')
          .with_mode('0640')
          .with_owner('root')
          .that_notifies('Service[radiusd]')
          .that_requires('Package[freeradius]')
          .that_requires('Group[radiusd]')
      end
    
      it do
        is_expected.to contain_file('/etc/raddb/mods-enabled/test')
          .with_ensure('link')
          .with_target('../mods-available/test')
      end
    end