puppet-zaqar/spec/classes/zaqar_keystone_trust_spec.rb
Thomas Herve 9b0dd8fed5 Allow configuration of trust notifier
To be able to use the trust notifier, we need to fill the trustee
section in the configuration.

Change-Id: Ibba7af4983303f3b85aa399f77391ba6bc984e8d
2017-07-19 14:25:26 +02:00

42 lines
1.2 KiB
Ruby

require 'spec_helper'
describe 'zaqar::keystone::trust' do
shared_examples_for 'zaqar::keystone::trust' do
describe 'with custom values' do
let :params do
{
:username => 'user',
:password => 'secret',
:auth_url => 'http://there',
:user_domain_name => 'domain',
:auth_section => 'keystone',
:auth_type => 'token',
}
end
it 'configures custom values' do
is_expected.to contain_zaqar_config('trustee/username').with_value('user')
is_expected.to contain_zaqar_config('trustee/password').with_value('secret')
is_expected.to contain_zaqar_config('trustee/auth_url').with_value('http://there')
is_expected.to contain_zaqar_config('trustee/user_domain_name').with_value('domain')
is_expected.to contain_zaqar_config('trustee/auth_section').with_value('keystone')
is_expected.to contain_zaqar_config('trustee/auth_type').with_value('token')
end
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_configures 'zaqar::keystone::trust'
end
end
end