Skip to content

Commit

Permalink
Ensure passed numbers are Integer
Browse files Browse the repository at this point in the history
These parameters used to be String (not enforced by types).  In order to
avoid changing the Unit Tests, they were kept as-is.  Now that
refactoring is done, switch to a better type.
  • Loading branch information
smortex committed Apr 17, 2018
1 parent 7c1747f commit bed0677
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions manifests/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@
Optional[String] $passenger_user = undef,
Optional[String] $passenger_group = undef,
Optional[Boolean] $passenger_friendly_error_pages = undef,
Optional[String] $passenger_min_instances = undef, # FIXME: Should be Integer, not String
Optional[Integer] $passenger_min_instances = undef,
Optional[Integer] $passenger_max_instances = undef,
Optional[Integer] $passenger_max_preloader_idle_time = undef,
Optional[Integer] $passenger_force_max_concurrent_requests_per_process = undef,
Optional[String] $passenger_start_timeout = undef, # FIXME: Should be Integer, not String
Optional[Integer] $passenger_start_timeout = undef,
Optional[Enum['process', 'thread']] $passenger_concurrency_model = undef,
Optional[Integer] $passenger_thread_count = undef,
Optional[String] $passenger_max_requests = undef, # FIXME: Should be Integer, not String
Optional[Integer] $passenger_max_requests = undef,
Optional[Integer] $passenger_max_request_time = undef,
Optional[Integer] $passenger_memory_limit = undef,
Optional[Integer] $passenger_stat_throttle_rate = undef,
Expand Down
6 changes: 3 additions & 3 deletions spec/defines/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -459,14 +459,14 @@
'passenger_user' => 'sandbox',
'passenger_group' => 'sandbox',
'passenger_friendly_error_pages' => false,
'passenger_min_instances' => '1',
'passenger_min_instances' => 1,
'passenger_max_instances' => 30,
'passenger_max_preloader_idle_time' => 600,
'passenger_force_max_concurrent_requests_per_process' => 10,
'passenger_start_timeout' => '600',
'passenger_start_timeout' => 600,
'passenger_concurrency_model' => 'thread',
'passenger_thread_count' => 5,
'passenger_max_requests' => '1000',
'passenger_max_requests' => 1000,
'passenger_max_request_time' => 2,
'passenger_memory_limit' => 64,
'passenger_stat_throttle_rate' => 5,
Expand Down

0 comments on commit bed0677

Please sign in to comment.