
Keystone puppet module creates "Member" and "_member_" roles, which creates confusion as to why both exist. In a parallel change [1] we modify keystone to only create the _member_ role. Here we switch Horizon to use that as the default role. See also rhbz#984294 [2] [1] https://review.openstack.org/#/c/60463/ [2] https://bugzilla.redhat.com/show_bug.cgi?id=984294 Change-Id: I329db398d0ec33eb3997167806717c45df7cec09
78 lines
2.1 KiB
Ruby
78 lines
2.1 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'openstack::horizon' do
|
|
|
|
let :required_params do
|
|
{ :secret_key => 'super_secret' }
|
|
end
|
|
|
|
let :params do
|
|
required_params
|
|
end
|
|
|
|
let :facts do
|
|
{
|
|
:osfamily => 'Redhat',
|
|
:memorysize => '1GB',
|
|
:processorcount => '1',
|
|
:concat_basedir => '/tmp',
|
|
:operatingsystemrelease => '5'
|
|
}
|
|
end
|
|
|
|
it 'should configure horizon and memcache using default parameters and secret key' do
|
|
should contain_class('memcached').with(
|
|
:listen_ip => '127.0.0.1',
|
|
:tcp_port => '11211',
|
|
:udp_port => '11211'
|
|
)
|
|
should contain_class('horizon').with(
|
|
:cache_server_ip => '127.0.0.1',
|
|
:cache_server_port => '11211',
|
|
:secret_key => 'super_secret',
|
|
:horizon_app_links => false,
|
|
:keystone_host => '127.0.0.1',
|
|
:keystone_scheme => 'http',
|
|
:keystone_default_role => '_member_',
|
|
:django_debug => 'False',
|
|
:api_result_limit => 1000
|
|
)
|
|
end
|
|
|
|
context 'when memcached is disabled' do
|
|
let :params do
|
|
required_params.merge(
|
|
:configure_memcached => false
|
|
)
|
|
end
|
|
it 'should configure horizon without memcached using default parameters and secret key' do
|
|
should_not contain_class('memcached')
|
|
should contain_class('horizon').with(
|
|
:cache_server_ip => '127.0.0.1',
|
|
:cache_server_port => '11211',
|
|
:secret_key => 'super_secret',
|
|
:horizon_app_links => false,
|
|
:keystone_host => '127.0.0.1',
|
|
:keystone_scheme => 'http',
|
|
:keystone_default_role => '_member_',
|
|
:django_debug => 'False',
|
|
:api_result_limit => 1000
|
|
)
|
|
end
|
|
end
|
|
|
|
context 'when memcached listen ip is overridden' do
|
|
let :params do
|
|
required_params.merge(
|
|
:configure_memcached => true,
|
|
:memcached_listen_ip => '10.10.10.10'
|
|
)
|
|
end
|
|
it 'should override params for memcached' do
|
|
should contain_class('memcached').with(
|
|
:listen_ip => '10.10.10.10'
|
|
)
|
|
end
|
|
end
|
|
end
|