
* Update spec tests in order to match rspec 3.x syntax (and puppet-rspec 2.x) * Remove gems over-specifications (puppetlabs_spec_helper already add runtime deps on rpsec, puppet-rspec and rake) * Fix RedHat fact (cherry-pick of commit https://review.openstack.org/106555/) * Pin fixtures to stable/icehouse (this module is EOL) * Pin concat to 1.2.1 Partial-Bug: #1326034 Change-Id: If299e1f9591f21d9410f2a5744d29823f913c000
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
|
|
is_expected.to contain_class('memcached').with(
|
|
:listen_ip => '127.0.0.1',
|
|
:tcp_port => '11211',
|
|
:udp_port => '11211'
|
|
)
|
|
is_expected.to 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
|
|
is_expected.to_not contain_class('memcached')
|
|
is_expected.to 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
|
|
is_expected.to contain_class('memcached').with(
|
|
:listen_ip => '10.10.10.10'
|
|
)
|
|
end
|
|
end
|
|
end
|