File tree Expand file tree Collapse file tree 4 files changed +23
-13
lines changed Expand file tree Collapse file tree 4 files changed +23
-13
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,3 @@ lookup_options:
44 php::fpm::pools :
55 merge : first
66
7- php::fpm::pools :
8- www :
9- catch_workers_output : ' no'
10- listen : ' 127.0.0.1:9000'
11- listen_backlog : ' -1'
12- pm : dynamic
13- pm_max_children : 50
14- pm_max_requests : 0
15- pm_max_spare_servers : 35
16- pm_min_spare_servers : 5
17- pm_start_servers : 5
18- request_terminate_timeout : 0
Original file line number Diff line number Diff line change 135135 $fpm_service_ensure = $php::params::fpm_service_ensure,
136136 $fpm_service_name = $php::params::fpm_service_name,
137137 $fpm_service_provider = undef ,
138- Hash $fpm_pools = {} ,
138+ Hash $fpm_pools = $php::params::fpm_pools ,
139139 Hash $fpm_global_pool_settings = {},
140140 $fpm_inifile = $php::params::fpm_inifile ,
141141 $fpm_package = undef ,
Original file line number Diff line number Diff line change 1515 $phpunit_max_age = 30
1616 $pool_purge = false
1717
18+ $fpm_pools = {
19+ ' www' => {
20+ ' catch_workers_output' => ' no' ,
21+ ' listen' => ' 127.0.0.1:9000' ,
22+ ' listen_backlog' => ' -1' ,
23+ ' pm' => ' dynamic' ,
24+ ' pm_max_children' => 50,
25+ ' pm_max_requests' => 0,
26+ ' pm_max_spare_servers' => 35,
27+ ' pm_min_spare_servers' => 5,
28+ ' pm_start_servers' => 5,
29+ ' request_terminate_timeout' => 0,
30+ },
31+ }
32+
1833 case $facts [' os' ][' family' ] {
1934 ' Debian' : {
2035 $config_root = $php::globals::globals_config_root
Original file line number Diff line number Diff line change 309309 end
310310 end
311311 end
312+
313+ describe 'when called with pool_purge => true and fpm_pools => {}' do
314+ let ( :params ) { { pool_purge : true , fpm_pools : { } } }
315+
316+ it { is_expected . to contain_class ( 'php::fpm' ) . with ( pool_purge : true ) }
317+ it { is_expected . not_to contain_php__fpm__pool ( 'www' ) }
318+ end
312319 end
313320 end
314321end
You can’t perform that action at this time.
0 commit comments