Skip to content

Commit 1a07759

Browse files
committed
Stricter data types
1 parent a9b9979 commit 1a07759

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

manifests/init.pp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@
4949
Variant[Stdlib::Absolutepath, Boolean] $client_body_temp_path = $nginx::params::client_body_temp_path,
5050
Boolean $confd_only = false,
5151
Boolean $confd_purge = false,
52-
$conf_dir = $nginx::params::conf_dir,
52+
Stdlib::Absolutepath $conf_dir = $nginx::params::conf_dir,
5353
Optional[Enum['on', 'off']] $daemon = undef,
54-
$daemon_user = $nginx::params::daemon_user,
55-
$daemon_group = undef,
54+
String[1] $daemon_user = $nginx::params::daemon_user,
55+
Optional[String[1]] $daemon_group = undef,
5656
Array[String] $dynamic_modules = [],
57-
$global_owner = $nginx::params::global_owner,
58-
$global_group = $nginx::params::global_group,
59-
$global_mode = $nginx::params::global_mode,
57+
String[1] $global_owner = $nginx::params::global_owner,
58+
String[1] $global_group = $nginx::params::global_group,
59+
Stdlib::Filemode $global_mode = $nginx::params::global_mode,
6060
Optional[Variant[String[1], Array[String[1]]]] $limit_req_zone = undef,
6161
Stdlib::Absolutepath $log_dir = $nginx::params::log_dir,
6262
String[1] $log_user = $nginx::params::log_user,
@@ -66,20 +66,20 @@
6666
$http_format_log = undef,
6767
Variant[String, Array[String]] $nginx_error_log = "${log_dir}/${nginx::params::nginx_error_log_file}",
6868
Nginx::ErrorLogSeverity $nginx_error_log_severity = 'error',
69-
$pid = $nginx::params::pid,
69+
Variant[Stdlib::Absolutepath, Boolean] $pid = $nginx::params::pid,
7070
Variant[Stdlib::Absolutepath, Boolean] $proxy_temp_path = $nginx::params::proxy_temp_path,
71-
$root_group = $nginx::params::root_group,
72-
$run_dir = $nginx::params::run_dir,
71+
String[1] $root_group = $nginx::params::root_group,
72+
Stdlib::Absolutepath $run_dir = $nginx::params::run_dir,
7373
$sites_available_owner = $nginx::params::sites_available_owner,
7474
$sites_available_group = $nginx::params::sites_available_group,
7575
$sites_available_mode = $nginx::params::sites_available_mode,
7676
Boolean $super_user = $nginx::params::super_user,
77-
$temp_dir = $nginx::params::temp_dir,
77+
Stdlib::Absolutepath $temp_dir = $nginx::params::temp_dir,
7878
Boolean $server_purge = false,
7979
Boolean $include_modules_enabled = $nginx::params::include_modules_enabled,
8080

8181
# Primary Templates
82-
$conf_template = 'nginx/conf.d/nginx.conf.erb',
82+
String[1] $conf_template = 'nginx/conf.d/nginx.conf.erb',
8383

8484
### START Nginx Configuration ###
8585
Optional[Enum['on', 'off']] $absolute_redirect = undef,

manifests/resource/mailhost.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@
102102
Optional[String] $ssl_trusted_cert = undef,
103103
Optional[Integer] $ssl_verify_depth = undef,
104104
Enum['on', 'off', 'only'] $starttls = 'off',
105-
$protocol = undef,
105+
Optional[Enum['imap', 'pop3', 'smtp']] $protocol = undef,
106106
Optional[String] $auth_http = undef,
107107
Optional[String] $auth_http_header = undef,
108-
String $xclient = 'on',
108+
Enum['on', 'off'] $xclient = 'on',
109109
Optional[String] $imap_auth = undef,
110110
Optional[Array] $imap_capabilities = undef,
111111
Optional[String] $imap_client_buffer = undef,

spec/defines/resource_mailhost_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@
9696
{
9797
title: 'should set protocol',
9898
attr: 'protocol',
99-
value: 'test-protocol',
100-
match: ' protocol test-protocol;'
99+
value: 'imap',
100+
match: ' protocol imap;'
101101
},
102102
{
103103
title: 'should set xclient',
104104
attr: 'xclient',
105-
value: 'test-xclient',
106-
match: ' xclient test-xclient;'
105+
value: 'off',
106+
match: ' xclient off;'
107107
},
108108
{
109109
title: 'should set auth_http',
@@ -533,14 +533,14 @@
533533
{
534534
title: 'should set protocol',
535535
attr: 'protocol',
536-
value: 'test-protocol',
537-
match: ' protocol test-protocol;'
536+
value: 'imap',
537+
match: ' protocol imap;'
538538
},
539539
{
540540
title: 'should set xclient',
541541
attr: 'xclient',
542-
value: 'test-xclient',
543-
match: ' xclient test-xclient;'
542+
value: 'off',
543+
match: ' xclient off;'
544544
},
545545
{
546546
title: 'should set auth_http',

0 commit comments

Comments
 (0)