<commit_before>require 'spec_helper_acceptance'
apache_hash = apache_settings_hash

# We need to restrict this test to RHEL 7.x, 8.x derived OSs as there are too many unique
# dependency issues to solve on all supported platforms.
describe 'apache::mod_authnz_ldap', if: os[:family] == 'redhat' && os[:release].to_i > 6 do
  context 'Default mod_authnz_ldap module installation' do
    pp = if run_shell("grep 'Oracle Linux Server' /etc/os-release", expect_failures: true).exit_status == 0
           <<-MANIFEST
      yumrepo { 'ol7_optional_latest':
        name 	  => 'ol7_optional_latest',
        baseurl 	  => 'https://yum.oracle.com/repo/OracleLinux/OL7/optional/latest/x86_64/',
        gpgkey 	  => 'file:///etc/pki/rpm-gpg/<KEY>KEY-oracle',
        gpgcheck => 1,
        enabled	   => 1,
      }
      class { 'apache': }
      class { 'apache::mod::authnz_ldap': }
      MANIFEST
         else
           <<-MANIFEST
        class { 'apache': }
        class { 'apache::mod::authnz_ldap': }
        MANIFEST
         end

    it 'succeeds in installing the mod_authnz_ldap module' do
      apply_manifest(pp, catch_failures: true)
    end

    describe file("#{apache_hash['mod_dir']}/authnz_ldap.load") do
      it { is_expected.to contain 'mod_authnz_ldap.so' }
    end
  end
end<commit_msg>(IAC-790) Enable EPEL repo for mod_authnz_ldap_spec.rb<commit_after>require 'spec_helper_acceptance'
apache_hash = apache_settings_hash

# We need to restrict this test to RHEL 7.x, 8.x derived OSs as there are too many unique
# dependency issues to solve on all supported platforms.
describe 'apache::mod_authnz_ldap', if: os[:family] == 'redhat' && os[:release].to_i > 6 do
  context 'Default mod_authnz_ldap module installation' do
    pp = if run_shell("grep 'Oracle Linux Server' /etc/os-release", expect_failures: true).exit_status == 0
           <<-MANIFEST
      yumrepo { 'ol7_optional_latest':
        name 	  => 'ol7_optional_latest',
        baseurl 	  => 'https://yum.oracle.com/repo/OracleLinux/OL7/optional/latest/x86_64/',
        gpgkey 	  => '<KEY>',
        gpgcheck => 1,
        enabled	   => 1,
      }
      class { 'apache': }
      class { 'apache::mod::authnz_ldap': }
      MANIFEST
         else
           <<-MANIFEST
        package { 'epel-release':
          ensure => present,
        }
        class { 'apache': }
        class { 'apache::mod::authnz_ldap': }
        MANIFEST
         end

    it 'succeeds in installing the mod_authnz_ldap module' do
      apply_manifest(pp, catch_failures: true)
    end

    describe file("#{apache_hash['mod_dir']}/authnz_ldap.load") do
      it { is_expected.to contain 'mod_authnz_ldap.so' }
    end
  end
end
{'fraction_non_alphanumeric': 0.11821561338289963, 'fraction_numerical': 0.010780669144981412, 'mean_word_length': 2.727146814404432, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 18, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6425223', 'n_tokens_mistral': 958, 'n_tokens_neox': 908, 'n_words': 212}