0c3813b05c
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
46 lines
965 B
Ruby
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
|