This change updates the test that currently do Debian/RedHat sets of tests to use on_supported_os from rspec-puppet-facts. This improves the over all coverage with the specific CentOS, Debian, RedHat and Ubuntu flavors of facts. Change-Id: Ic7b12cd8972bbde0574806acb2d680f14f1c267f
28 lines
710 B
Ruby
28 lines
710 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'cinder::volume' do
|
|
|
|
let :pre_condition do
|
|
'class { "cinder": rabbit_password => "fpp", database_connection => "mysql://a:b@c/d" }'
|
|
end
|
|
|
|
let :facts do
|
|
OSDefaults.get_facts({:osfamily => 'Debian'})
|
|
end
|
|
|
|
it { is_expected.to contain_package('cinder-volume').with_ensure('present') }
|
|
it { is_expected.to contain_service('cinder-volume').with(
|
|
'hasstatus' => true,
|
|
'tag' => 'cinder-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('cinder-volume').without_ensure
|
|
end
|
|
end
|
|
end
|