2012-06-04 16:37:33 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'swift::keystone::dispersion' do
|
|
|
|
|
|
|
|
describe 'with default class parameters' do
|
|
|
|
|
|
|
|
it { should contain_keystone_user('dispersion').with(
|
|
|
|
:ensure => 'present',
|
2012-11-21 20:15:53 +01:00
|
|
|
:password => 'dispersion_password',
|
|
|
|
:email => 'swift@localhost',
|
|
|
|
:tenant => 'services'
|
2012-06-04 16:37:33 +02:00
|
|
|
) }
|
|
|
|
|
|
|
|
it { should contain_keystone_user_role('dispersion@services').with(
|
|
|
|
:ensure => 'present',
|
|
|
|
:roles => 'admin',
|
|
|
|
:require => 'Keystone_user[dispersion]'
|
|
|
|
) }
|
|
|
|
end
|
|
|
|
|
2012-11-21 20:15:53 +01:00
|
|
|
describe 'when overriding parameters' do
|
2012-06-04 16:37:33 +02:00
|
|
|
|
|
|
|
let :params do
|
|
|
|
{
|
2012-11-21 20:15:53 +01:00
|
|
|
:auth_user => 'bar',
|
|
|
|
:auth_pass => 'foo',
|
|
|
|
:email => 'bar@example.com',
|
|
|
|
:tenant => 'dummyTenant'
|
2012-06-04 16:37:33 +02:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2012-11-21 20:15:53 +01:00
|
|
|
it { should contain_keystone_user('bar').with(
|
2012-06-04 16:37:33 +02:00
|
|
|
:ensure => 'present',
|
2012-11-21 20:15:53 +01:00
|
|
|
:password => 'foo',
|
|
|
|
:email => 'bar@example.com',
|
|
|
|
:tenant => 'dummyTenant'
|
2012-06-04 16:37:33 +02:00
|
|
|
) }
|
|
|
|
|
2012-11-21 20:15:53 +01:00
|
|
|
it { should contain_keystone_user_role('bar@dummyTenant') }
|
2012-06-04 16:37:33 +02:00
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|