Merge pull request #81 from Mirantis/fix-swauth
Fix missing package_ensure in swauth
This commit is contained in:
@@ -2,7 +2,8 @@
|
|||||||
# [*swauth_super_admin_user*]
|
# [*swauth_super_admin_user*]
|
||||||
class swift::proxy::swauth(
|
class swift::proxy::swauth(
|
||||||
$swauth_endpoint = '127.0.0.1',
|
$swauth_endpoint = '127.0.0.1',
|
||||||
$swauth_super_admin_key = 'swauthkey'
|
$swauth_super_admin_key = 'swauthkey',
|
||||||
|
$package_ensure = 'present'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
package { 'python-swauth':
|
package { 'python-swauth':
|
||||||
|
@@ -17,7 +17,7 @@ describe 'swift::proxy::swauth' do
|
|||||||
"/var/lib/puppet/concat/_etc_swift_proxy-server.conf/fragments/20_swift_proxy_swauth"
|
"/var/lib/puppet/concat/_etc_swift_proxy-server.conf/fragments/20_swift_proxy_swauth"
|
||||||
end
|
end
|
||||||
|
|
||||||
it { should contain_package('python-swauth') }
|
it { should contain_package('python-swauth').with_ensure('present') }
|
||||||
|
|
||||||
it { should contain_file(fragment_file).with_content(/[filter:swauth]/) }
|
it { should contain_file(fragment_file).with_content(/[filter:swauth]/) }
|
||||||
it { should contain_file(fragment_file).with_content(/use = egg:swauth#swauth/) }
|
it { should contain_file(fragment_file).with_content(/use = egg:swauth#swauth/) }
|
||||||
@@ -29,23 +29,17 @@ describe 'swift::proxy::swauth' do
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'with overridden endpoint' do
|
describe 'with overridden parameters' do
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{:swauth_endpoint => '10.0.0.1'}
|
{:swauth_endpoint => '10.0.0.1',
|
||||||
|
:swauth_super_admin_key => 'foo',
|
||||||
|
:package_ensure => 'latest' }
|
||||||
end
|
end
|
||||||
|
|
||||||
it { should contain_file(fragment_file).with_content(/default_swift_cluster = local#10\.0\.0\.1/) }
|
it { should contain_file(fragment_file).with_content(/default_swift_cluster = local#10\.0\.0\.1/) }
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'with overridden admin key' do
|
|
||||||
|
|
||||||
let :params do
|
|
||||||
{:swauth_super_admin_key => 'foo'}
|
|
||||||
end
|
|
||||||
|
|
||||||
it { should contain_file(fragment_file).with_content(/super_admin_key = foo/) }
|
it { should contain_file(fragment_file).with_content(/super_admin_key = foo/) }
|
||||||
|
it { should contain_package('python-swauth').with_ensure('latest') }
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user