2015-08-28 15:09:00 +03:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'murano::keystone::auth' do
|
|
|
|
|
|
|
|
let :facts do
|
|
|
|
{ :osfamily => 'Debian' }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'with default class parameters' do
|
|
|
|
let :params do
|
|
|
|
{ :password => 'murano_password',
|
|
|
|
:tenant => 'foobar' }
|
|
|
|
end
|
|
|
|
|
|
|
|
it { is_expected.to contain_keystone_user('murano').with(
|
|
|
|
:ensure => 'present',
|
|
|
|
:password => 'murano_password',
|
|
|
|
) }
|
|
|
|
|
|
|
|
it { is_expected.to contain_keystone_user_role('murano@foobar').with(
|
|
|
|
:ensure => 'present',
|
|
|
|
:roles => ['admin']
|
|
|
|
)}
|
|
|
|
|
2016-02-25 15:39:28 +03:00
|
|
|
it { is_expected.to contain_keystone_service('murano::application-catalog').with(
|
2015-08-28 15:09:00 +03:00
|
|
|
:ensure => 'present',
|
|
|
|
:description => 'Murano Application Catalog'
|
|
|
|
) }
|
|
|
|
|
2016-02-25 15:39:28 +03:00
|
|
|
it { is_expected.to contain_keystone_endpoint('RegionOne/murano::application-catalog').with(
|
2015-08-28 15:09:00 +03:00
|
|
|
:ensure => 'present',
|
|
|
|
:public_url => "http://127.0.0.1:8082",
|
|
|
|
:admin_url => "http://127.0.0.1:8082",
|
|
|
|
:internal_url => "http://127.0.0.1:8082"
|
|
|
|
) }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'with endpoint parameters' do
|
|
|
|
let :params do
|
|
|
|
{ :password => 'murano_password',
|
|
|
|
:public_url => 'https://10.10.10.10:80',
|
|
|
|
:internal_url => 'http://10.10.10.11:81',
|
|
|
|
:admin_url => 'http://10.10.10.12:81' }
|
|
|
|
end
|
|
|
|
|
2016-02-25 15:39:28 +03:00
|
|
|
it { is_expected.to contain_keystone_endpoint('RegionOne/murano::application-catalog').with(
|
2015-08-28 15:09:00 +03:00
|
|
|
:ensure => 'present',
|
|
|
|
:public_url => 'https://10.10.10.10:80',
|
|
|
|
:internal_url => 'http://10.10.10.11:81',
|
|
|
|
:admin_url => 'http://10.10.10.12:81'
|
|
|
|
) }
|
|
|
|
end
|
|
|
|
|
2016-06-02 14:16:23 -04:00
|
|
|
describe 'when overriding auth and service name' do
|
2015-08-28 15:09:00 +03:00
|
|
|
let :params do
|
|
|
|
{ :password => 'foo',
|
2016-06-02 14:16:23 -04:00
|
|
|
:service_name => 'muranoy',
|
2015-08-28 15:09:00 +03:00
|
|
|
:auth_name => 'muranoy' }
|
|
|
|
end
|
|
|
|
|
|
|
|
it { is_expected.to contain_keystone_user('muranoy') }
|
|
|
|
it { is_expected.to contain_keystone_user_role('muranoy@services') }
|
2016-02-25 15:39:28 +03:00
|
|
|
it { is_expected.to contain_keystone_service('muranoy::application-catalog') }
|
|
|
|
it { is_expected.to contain_keystone_endpoint('RegionOne/muranoy::application-catalog') }
|
2015-08-28 15:09:00 +03:00
|
|
|
end
|
2016-06-02 14:16:23 -04:00
|
|
|
|
2015-08-28 15:09:00 +03:00
|
|
|
end
|