Merge pull request #438 from 3flex/future-parser
Test with future parser
This commit is contained in:
commit
d8d116c9ed
5 changed files with 25 additions and 13 deletions
|
@ -19,10 +19,14 @@ matrix:
|
||||||
env: PUPPET_GEM_VERSION="~> 3.0"
|
env: PUPPET_GEM_VERSION="~> 3.0"
|
||||||
- rvm: 2.1.0
|
- rvm: 2.1.0
|
||||||
env: PUPPET_GEM_VERSION="~> 3.0"
|
env: PUPPET_GEM_VERSION="~> 3.0"
|
||||||
|
- rvm: 2.1.0
|
||||||
|
env: PUPPET_GEM_VERSION="~> 3.5.0" FUTURE_PARSER="yes"
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- rvm: 1.8.7
|
- rvm: 1.8.7
|
||||||
env: PUPPET_GEM_VERSION="~> 2.7.0"
|
env: PUPPET_GEM_VERSION="~> 2.7.0"
|
||||||
- rvm: 1.8.7
|
- rvm: 1.8.7
|
||||||
env: PUPPET_GEM_VERSION="~> 3.0"
|
env: PUPPET_GEM_VERSION="~> 3.0"
|
||||||
|
- rvm: 2.1.0
|
||||||
|
env: PUPPET_GEM_VERSION="~> 3.5.0" FUTURE_PARSER="yes"
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
|
@ -96,12 +96,12 @@ class nginx (
|
||||||
$worker_connections = $nginx::params::nx_worker_connections,
|
$worker_connections = $nginx::params::nx_worker_connections,
|
||||||
$worker_processes = $nginx::params::nx_worker_processes,
|
$worker_processes = $nginx::params::nx_worker_processes,
|
||||||
$worker_rlimit_nofile = $nginx::params::nx_worker_rlimit_nofile,
|
$worker_rlimit_nofile = $nginx::params::nx_worker_rlimit_nofile,
|
||||||
$global_owner = $nginx::params::nx_global_owner,
|
$global_owner = $nginx::params::global_owner,
|
||||||
$global_group = $nginx::params::nx_global_group,
|
$global_group = $nginx::params::global_group,
|
||||||
$global_mode = $nginx::params::nx_global_mode,
|
$global_mode = $nginx::params::global_mode,
|
||||||
$sites_available_owner = $nginx::params::nx_sites_available_owner,
|
$sites_available_owner = $nginx::params::sites_available_owner,
|
||||||
$sites_available_group = $nginx::params::nx_sites_available_group,
|
$sites_available_group = $nginx::params::sites_available_group,
|
||||||
$sites_available_mode = $nginx::params::nx_sites_available_mode,
|
$sites_available_mode = $nginx::params::sites_available_mode,
|
||||||
$geo_mappings = {},
|
$geo_mappings = {},
|
||||||
$string_mappings = {},
|
$string_mappings = {},
|
||||||
) inherits nginx::params {
|
) inherits nginx::params {
|
||||||
|
|
|
@ -49,13 +49,13 @@ class nginx::params {
|
||||||
'X-Forwarded-For $proxy_add_x_forwarded_for',
|
'X-Forwarded-For $proxy_add_x_forwarded_for',
|
||||||
]
|
]
|
||||||
$nx_proxy_cache_path = false
|
$nx_proxy_cache_path = false
|
||||||
$nx_proxy_cache_levels = 1
|
$nx_proxy_cache_levels = '1'
|
||||||
$nx_proxy_cache_keys_zone = 'd2:100m'
|
$nx_proxy_cache_keys_zone = 'd2:100m'
|
||||||
$nx_proxy_cache_max_size = '500m'
|
$nx_proxy_cache_max_size = '500m'
|
||||||
$nx_proxy_cache_inactive = '20m'
|
$nx_proxy_cache_inactive = '20m'
|
||||||
|
|
||||||
$nx_fastcgi_cache_path = false
|
$nx_fastcgi_cache_path = false
|
||||||
$nx_fastcgi_cache_levels = 1
|
$nx_fastcgi_cache_levels = '1'
|
||||||
$nx_fastcgi_cache_keys_zone = 'd3:100m'
|
$nx_fastcgi_cache_keys_zone = 'd3:100m'
|
||||||
$nx_fastcgi_cache_max_size = '500m'
|
$nx_fastcgi_cache_max_size = '500m'
|
||||||
$nx_fastcgi_cache_inactive = '20m'
|
$nx_fastcgi_cache_inactive = '20m'
|
||||||
|
|
|
@ -76,7 +76,7 @@ define nginx::resource::upstream (
|
||||||
# Uses: $name, $upstream_cfg_prepend
|
# Uses: $name, $upstream_cfg_prepend
|
||||||
concat::fragment { "${name}_upstream_header":
|
concat::fragment { "${name}_upstream_header":
|
||||||
target => "${nginx::config::conf_dir}/conf.d/${name}-upstream.conf",
|
target => "${nginx::config::conf_dir}/conf.d/${name}-upstream.conf",
|
||||||
order => 10,
|
order => '10',
|
||||||
content => template('nginx/conf.d/upstream_header.erb'),
|
content => template('nginx/conf.d/upstream_header.erb'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ define nginx::resource::upstream (
|
||||||
# Uses: $members, $upstream_fail_timeout
|
# Uses: $members, $upstream_fail_timeout
|
||||||
concat::fragment { "${name}_upstream_members":
|
concat::fragment { "${name}_upstream_members":
|
||||||
target => "${nginx::config::conf_dir}/conf.d/${name}-upstream.conf",
|
target => "${nginx::config::conf_dir}/conf.d/${name}-upstream.conf",
|
||||||
order => 50,
|
order => '50',
|
||||||
content => template('nginx/conf.d/upstream_members.erb'),
|
content => template('nginx/conf.d/upstream_members.erb'),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -94,7 +94,7 @@ define nginx::resource::upstream (
|
||||||
|
|
||||||
concat::fragment { "${name}_upstream_footer":
|
concat::fragment { "${name}_upstream_footer":
|
||||||
target => "${nginx::config::conf_dir}/conf.d/${name}-upstream.conf",
|
target => "${nginx::config::conf_dir}/conf.d/${name}-upstream.conf",
|
||||||
order => 90,
|
order => '90',
|
||||||
content => "}\n",
|
content => "}\n",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,11 +26,19 @@ describe 'nginx::service' do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "when configtest_enable => true" do
|
describe "when configtest_enable => true" do
|
||||||
let(:params) {{ :configtest_enable => true, :service_restart => '/etc/init.d/nginx configtest && /etc/init.d/nginx restart'}}
|
let :params do {
|
||||||
|
:configtest_enable => true,
|
||||||
|
:service_restart => '/etc/init.d/nginx configtest && /etc/init.d/nginx restart',
|
||||||
|
:service_ensure => 'running',
|
||||||
|
} end
|
||||||
it { is_expected.to contain_service('nginx').with_restart('/etc/init.d/nginx configtest && /etc/init.d/nginx restart') }
|
it { is_expected.to contain_service('nginx').with_restart('/etc/init.d/nginx configtest && /etc/init.d/nginx restart') }
|
||||||
|
|
||||||
context "when service_restart => 'a restart command'" do
|
context "when service_restart => 'a restart command'" do
|
||||||
let(:params) {{ :configtest_enable => true, :service_restart => 'a restart command' }}
|
let :params do {
|
||||||
|
:configtest_enable => true,
|
||||||
|
:service_restart => 'a restart command',
|
||||||
|
:service_ensure => 'running',
|
||||||
|
} end
|
||||||
it { is_expected.to contain_service('nginx').with_restart('a restart command') }
|
it { is_expected.to contain_service('nginx').with_restart('a restart command') }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue