puppet-placement/spec/defines/placement_generic_service_spec.rb
Tobias Urdin 0c3813b05c Cleanup docs, testing and missed things
The cookiecutter underwent a lot of cleanup in
docs and testing, unfortunately placement was
cut before those were merged so this applies
those changes. [1] [2] [3] [4] [5]

[1] https://review.openstack.org/#/c/624624/
[2] https://review.openstack.org/#/c/624338/
[3] https://review.openstack.org/#/c/614803/
[4] https://review.openstack.org/#/c/610859/
[5] https://review.openstack.org/#/c/622925/

Change-Id: I35903872a9cd3dcaafed4d03fc9b57f04474b087
2018-12-13 09:37:43 +01:00

46 lines
965 B
Ruby

require 'spec_helper'
describe 'placement::generic_service' do
shared_examples 'placement::generic_service' do
let :pre_condition do
'include placement'
end
let :params do
{
:package_name => 'foo',
:service_name => 'food'
}
end
let :title do
'foo'
end
it { should contain_service('placement-foo').with(
:name => 'food',
:ensure => 'running',
:enable => true,
)}
it { should contain_service('placement-foo').that_subscribes_to(
'Anchor[placement::service::begin]',
)}
it { should contain_service('placement-foo').that_notifies(
'Anchor[placement::service::end]',
)}
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts())
end
it_behaves_like 'placement::generic_service'
end
end
end