view modules/apache/spec/classes/vhosts_spec.rb @ 257:675c1cc61eaf

Update Apache module to get CentOS 8 support Unfortunately it only fixes some bits. mod_wsgi still needs other approaches This also overrides the vhost modification to make them come last in the import order (after module loading)
author IBBoard <dev@ibboard.co.uk>
date Sun, 22 Dec 2019 14:43:29 -0500
parents
children d9352a684e62
line wrap: on
line source

require 'spec_helper'

describe 'apache::vhosts', :type => :class do
  context 'on all OSes' do
    let :facts do
      {
          :id                     => 'root',
          :kernel                 => 'Linux',
          :osfamily               => 'RedHat',
          :operatingsystem        => 'RedHat',
          :operatingsystemrelease => '6',
          :concat_basedir         => '/dne',
          :path                   => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
          :is_pe                  => false,
      }
    end
    context 'with custom vhosts parameter' do
      let :params do {
          :vhosts => {
              'custom_vhost_1' => {
                  'docroot' => '/var/www/custom_vhost_1',
                  'port' => '81',
              },
              'custom_vhost_2' => {
                  'docroot' => '/var/www/custom_vhost_2',
                  'port' => '82',
              },
          },
      }
      end
      it { is_expected.to contain_apache__vhost('custom_vhost_1') }
      it { is_expected.to contain_apache__vhost('custom_vhost_2') }
    end
  end
end