|
34 | 34 | } |
35 | 35 | end |
36 | 36 |
|
| 37 | + |
37 | 38 | it { is_expected.to contain_class("apache::params") } |
38 | 39 | it { is_expected.not_to contain_apache__mod('event') } |
39 | 40 | it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file') } |
40 | 41 | it { is_expected.to contain_file("/etc/apache2/mods-enabled/event.conf").with_ensure('link') } |
41 | 42 |
|
| 43 | + context "Test mpm_event params" do |
| 44 | + let :params do |
| 45 | + { |
| 46 | + :serverlimit => '0', |
| 47 | + :startservers => '1', |
| 48 | + :maxclients => '2', |
| 49 | + :minsparethreads => '3', |
| 50 | + :maxsparethreads => '4', |
| 51 | + :threadsperchild => '5', |
| 52 | + :maxrequestsperchild => '6', |
| 53 | + :threadlimit => '7', |
| 54 | + :listenbacklog => '8', |
| 55 | + :maxrequestworkers => '9', |
| 56 | + :maxconnectionsperchild => '10', |
| 57 | + } |
| 58 | + end |
| 59 | + |
| 60 | + it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*ServerLimit\s*0/) } |
| 61 | + it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*StartServers\s*1/) } |
| 62 | + it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*MaxClients\s*2/) } |
| 63 | + it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*MinSpareThreads\s*3/) } |
| 64 | + it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*MaxSpareThreads\s*4/) } |
| 65 | + it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*ThreadsPerChild\s*5/) } |
| 66 | + it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*MaxRequestsPerChild\s*6/) } |
| 67 | + it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*ThreadLimit\s*7/) } |
| 68 | + it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*ListenBacklog\s*8/) } |
| 69 | + it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*MaxRequestWorkers\s*9/) } |
| 70 | + it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*MaxConnectionsPerChild\s*10/) } |
| 71 | + end |
| 72 | + |
42 | 73 | context "with Apache version < 2.4" do |
43 | 74 | let :params do |
44 | 75 | { |
|
0 commit comments