|
5 | 5 | describe 'apache::vhost', type: :define do |
6 | 6 | describe 'os-independent items' do |
7 | 7 | on_supported_os.each do |os, facts| |
8 | | - # this setup uses fastcgi wich isn't available on RHEL 7 / RHEL 8 / Ubuntu 18.04 |
9 | | - next if facts[:os]['release']['major'] == '18.04' || facts[:os]['release']['major'] == '20.04' |
10 | | - next if (facts[:os]['release']['major'] == '7' || facts[:os]['release']['major'] == '8') && facts[:os]['family']['RedHat'] |
11 | | - # next if facts[:os]['name'] == 'SLES' |
12 | | - |
13 | 8 | apache_name = case facts[:os]['family'] |
14 | 9 | when 'RedHat' |
15 | 10 | 'httpd' |
|
46 | 41 | it { is_expected.to contain_class('apache::params') } |
47 | 42 | it { is_expected.to contain_apache__listen(params[:port]) } |
48 | 43 | # namebased virualhost is only created on apache 2.2 and older |
49 | | - if (facts[:os]['family'] == 'RedHat' && facts[:os]['release']['major'].to_i < 8) || |
| 44 | + if (facts[:os]['family'] == 'RedHat' && facts[:os]['release']['major'].to_i < 7) || |
50 | 45 | (facts[:os]['name'] == 'Amazon') || |
51 | 46 | (facts[:os]['name'] == 'SLES' && facts[:os]['release']['major'].to_i < 12) |
52 | 47 | it { is_expected.to contain_apache__namevirtualhost("*:#{params[:port]}") } |
|
441 | 436 | }, |
442 | 437 | 'wsgi_chunked_request' => 'On', |
443 | 438 | 'action' => 'foo', |
444 | | - 'fastcgi_server' => 'localhost', |
445 | | - 'fastcgi_socket' => '/tmp/fastcgi.socket', |
446 | | - 'fastcgi_dir' => '/tmp', |
447 | | - 'fastcgi_idle_timeout' => '120', |
448 | 439 | 'additional_includes' => '/custom/path/includes', |
449 | 440 | 'apache_version' => '2.4', |
450 | 441 | 'use_optional_includes' => true, |
|
578 | 569 | } |
579 | 570 | it { is_expected.to contain_class('apache::mod::alias') } |
580 | 571 | it { is_expected.to contain_class('apache::mod::env') } |
581 | | - it { is_expected.to contain_class('apache::mod::fastcgi') } |
582 | 572 | it { is_expected.to contain_class('apache::mod::filter') } |
583 | 573 | it { is_expected.to contain_class('apache::mod::headers') } |
584 | 574 | it { is_expected.to contain_class('apache::mod::mime') } |
|
788 | 778 | it { is_expected.to contain_concat__fragment('rspec.example.com-requestheader') } |
789 | 779 | it { is_expected.to contain_concat__fragment('rspec.example.com-wsgi') } |
790 | 780 | it { is_expected.to contain_concat__fragment('rspec.example.com-custom_fragment') } |
791 | | - it { is_expected.to contain_concat__fragment('rspec.example.com-fastcgi') } |
792 | 781 | it { is_expected.to contain_concat__fragment('rspec.example.com-suexec') } |
793 | 782 | it { is_expected.to contain_concat__fragment('rspec.example.com-allow_encoded_slashes') } |
794 | 783 | it { is_expected.to contain_concat__fragment('rspec.example.com-passenger') } |
|
1772 | 1761 | end |
1773 | 1762 | end |
1774 | 1763 |
|
| 1764 | + # this setup uses fastcgi wich isn't available on RHEL 7 / RHEL 8 / Debian / Ubuntu |
| 1765 | + unless facts[:os]['family'] || (facts[:os]['family'] == 'RedHat' && facts[:os]['release']['major'].to_i >= 7) |
| 1766 | + describe 'fastcgi options' do |
| 1767 | + let :params do |
| 1768 | + { |
| 1769 | + 'docroot' => '/var/www/foo', |
| 1770 | + 'fastcgi_server' => 'localhost', |
| 1771 | + 'fastcgi_socket' => '/tmp/fastcgi.socket', |
| 1772 | + 'fastcgi_dir' => '/tmp', |
| 1773 | + 'fastcgi_idle_timeout' => '120', |
| 1774 | + } |
| 1775 | + end |
| 1776 | + |
| 1777 | + it { is_expected.to compile } |
| 1778 | + it { is_expected.to contain_class('apache::mod::fastcgi') } |
| 1779 | + it { is_expected.to contain_concat__fragment('rspec.example.com-fastcgi') } |
| 1780 | + end |
| 1781 | + end |
| 1782 | + |
1775 | 1783 | context 'require unmanaged' do |
1776 | 1784 | let :params do |
1777 | 1785 | { |
|
0 commit comments