puppet-swift/spec/classes/swift_proxy_keystone_spec.rb
Chmouel Boudjnah 000d63b654 Fix auth_token configuration.
- cache=swift.cache need to be in auth_token configuration not in
  keystoneauth.
- Make auth_token using the same facility for logging than main swift.

Closes-Bug: #1254487

Change-Id: If5a09da4d18f247dc42b99e6f666bc2867d06dcb
2013-11-24 18:52:48 +01:00

49 lines
1.1 KiB
Ruby

require 'spec_helper'
describe 'swift::proxy::keystone' do
let :facts do
{
:concat_basedir => '/var/lib/puppet/concat',
}
end
let :fragment_file do
'/var/lib/puppet/concat/_etc_swift_proxy-server.conf/fragments/79_swift_keystone'
end
let :pre_condition do
'
include concat::setup
concat { "/etc/swift/proxy-server.conf": }
'
end
it { should contain_file(fragment_file).with_content(/[filter:keystone]/) }
it { should contain_file(fragment_file).with_content(/use = egg:swift#keystoneauth/) }
describe 'with defaults' do
it { should contain_file(fragment_file).with_content(/operator_roles = admin, SwiftOperator/) }
it { should contain_file(fragment_file).with_content(/is_admin = true/) }
end
describe 'with parameter overrides' do
let :params do
{
:operator_roles => 'foo',
:is_admin => 'false',
}
it { should contain_file(fragment_file).with_content(/operator_roles = foo/) }
it { should contain_file(fragment_file).with_content(/is_admin = false/) }
end
end
end