
Switch to $::os_service_default all params in logging and db. Changes: logging.pp, db.pp and tests. Related-bug: #1515273 Change-Id: Idf7bc36d321328391a1b361add965c53627124a4
55 lines
1.3 KiB
Ruby
55 lines
1.3 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'manila::share' do
|
|
|
|
shared_examples_for 'manila-share' do
|
|
let :pre_condition do
|
|
'class { "manila": rabbit_password => "fpp", sql_connection => "mysql://a:b@c/d" }'
|
|
end
|
|
|
|
it { is_expected.to contain_package('manila-share').with(
|
|
:name => platform_params[:package_name],
|
|
:ensure => 'present',
|
|
:tag => ['openstack', 'manila-package'],
|
|
) }
|
|
it { is_expected.to contain_service('manila-share').with(
|
|
'hasstatus' => true,
|
|
'tag' => 'manila-service',
|
|
)}
|
|
|
|
describe 'with manage_service false' do
|
|
let :params do
|
|
{ 'manage_service' => false }
|
|
end
|
|
it 'should not change the state of the service' do
|
|
is_expected.to contain_service('manila-share').without_ensure
|
|
end
|
|
end
|
|
end
|
|
|
|
context 'on Debian platforms' do
|
|
let :facts do
|
|
@default_facts.merge({ :osfamily => 'Debian' })
|
|
end
|
|
|
|
let :platform_params do
|
|
{ :package_name => 'manila-share' }
|
|
end
|
|
|
|
it_configures 'manila-share'
|
|
end
|
|
|
|
context 'on RedHat platforms' do
|
|
let :facts do
|
|
@default_facts.merge({ :osfamily => 'RedHat' })
|
|
end
|
|
|
|
let :platform_params do
|
|
{ :package_name => 'openstack-manila-share' }
|
|
end
|
|
|
|
it_configures 'manila-share'
|
|
end
|
|
|
|
end
|