Merge "Allow using cloudkitty-api as service name"
This commit is contained in:
commit
4c1999f79b
|
@ -74,7 +74,15 @@ class cloudkitty::api (
|
|||
include cloudkitty::db::sync
|
||||
}
|
||||
|
||||
if $service_name == 'httpd' {
|
||||
if $service_name == $::cloudkitty::params::api_service_name {
|
||||
service { 'cloudkitty-api':
|
||||
enable => $enabled,
|
||||
name => 'cloudkitty-api',
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
tag => 'cloudkitty-service',
|
||||
}
|
||||
} elsif $service_name == 'httpd' {
|
||||
include apache::params
|
||||
service { 'cloudkitty-api':
|
||||
ensure => 'stopped',
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
It is now possible to run cloudkitty-api using the default package service,
|
||||
which may be useful if running under Debian, where cloudkitty-api runs
|
||||
using uwsgi.
|
|
@ -54,6 +54,22 @@ describe 'cloudkitty::api' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when running cloudkitty-api as standalone' do
|
||||
before do
|
||||
params.merge!({ :service_name => platform_params[:api_service_name] })
|
||||
end
|
||||
|
||||
it 'configures cloudkitty-api service as standalone' do
|
||||
is_expected.to contain_service('cloudkitty-api').with(
|
||||
:enable => true,
|
||||
:name => platform_params[:api_service_name],
|
||||
:hasstatus => true,
|
||||
:hasrestart => true,
|
||||
:tag => 'cloudkitty-service',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when service_name is not valid' do
|
||||
before do
|
||||
params.merge!({ :service_name => 'foobar' })
|
||||
|
|
Loading…
Reference in New Issue