puppet-keystone/spec/classes/keystone_service_spec.rb
Emilien Macchi a5dbb53c19 Deprecate service_provider
Overriding service_provider was an hack and should not exist in any
module.
Puppet is by itself able to find which Service provider to use.
If you want to override it for any reason, please use a Puppet resource
collector, using keystone-service resource tag.

This patch deprecates the service_provider parameter and drop its usage,
so puppet-keystone can easily work on more systems, (ie: Ubuntu Xenial
with Systemd).

Change-Id: I661319aa83676880a83f3ecfc00e9a803524c7cf
2016-04-21 21:56:31 -04:00

38 lines
905 B
Ruby

require 'spec_helper'
describe 'keystone::service' do
let :facts do
@default_facts.merge({ :osfamily => 'Debian' })
end
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