
In order to be able to take an action after all the packages of the module have been installed/updated or all the services have been started/restarted, we set a 'keystone-package' and 'keyston-service' tag for each package and service of this module. At the moment, there is a generic openstack tag that is not specific enough if one wants to take action upon a single module change. Use case : If an action needs to be taken after all the packages have been installed or updated : Package <| tag == 'keystone-package' |> -> X Change-Id: I2de6880ba14ccd07b5d4c1928ddcde821bc9625d
34 lines
830 B
Ruby
34 lines
830 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'keystone::service' do
|
|
|
|
describe "with default parameters" do
|
|
it { is_expected.to contain_service('keystone').with(
|
|
:ensure => nil,
|
|
:enable => true,
|
|
:hasstatus => true,
|
|
:hasrestart => true,
|
|
:tag => 'keystone-service',
|
|
) }
|
|
it { is_expected.to_not contain_exec('validate_keystone_connection') }
|
|
end
|
|
|
|
describe "with validation on" do
|
|
let :params do
|
|
{
|
|
:validate => 'true',
|
|
:admin_token => 'admintoken'
|
|
}
|
|
end
|
|
|
|
it { is_expected.to contain_service('keystone').with(
|
|
:ensure => nil,
|
|
:enable => true,
|
|
:hasstatus => true,
|
|
:hasrestart => true,
|
|
:tag => 'keystone-service',
|
|
) }
|
|
it { is_expected.to contain_exec('validate_keystone_connection') }
|
|
end
|
|
end
|