f8d59f0e35
... because it is actually required so that zaqar can authenticate with keystone. Depends-on: https://review.opendev.org/903852 Change-Id: I8e5ea733f10abfdcc5da0699311222cfbe6cbf4e
57 lines
2.0 KiB
Ruby
57 lines
2.0 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'zaqar::keystone::trust' do
|
|
|
|
shared_examples_for 'zaqar::keystone::trust' do
|
|
let :params do
|
|
{ :password => 'secret' }
|
|
end
|
|
|
|
context 'with default values' do
|
|
it 'configures default values' do
|
|
is_expected.to contain_zaqar_config('trustee/username').with_value('zaqar')
|
|
is_expected.to contain_zaqar_config('trustee/password').with_value('secret').with_secret(true)
|
|
is_expected.to contain_zaqar_config('trustee/auth_url').with_value('http://localhost:5000')
|
|
is_expected.to contain_zaqar_config('trustee/user_domain_name').with_value('Default')
|
|
is_expected.to contain_zaqar_config('trustee/auth_section').with_value('<SERVICE DEFAULT>')
|
|
is_expected.to contain_zaqar_config('trustee/auth_type').with_value('password')
|
|
end
|
|
end
|
|
|
|
context 'with custom values' do
|
|
before :each do
|
|
params.merge!({
|
|
: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').with_secret(true)
|
|
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
|
|
|