| 1 |
require 'spec_helper' |
| 2 |
|
| 3 |
describe 'nova::consoleauth' do |
| 4 |
|
| 5 |
shared_examples 'nova::consoleauth' do |
| 6 |
context 'with defaults' do |
| 7 |
it 'configures consoleauth in nova.conf' do |
| 8 |
should contain_nova_config('consoleauth/token_ttl').with_value('<SERVICE DEFAULT>') |
| 9 |
should contain_nova_config('consoleauth/enforce_session_timeout').with_value('<SERVICE DEFAULT>') |
| 10 |
end |
| 11 |
end |
| 12 |
|
| 13 |
context 'with parameters' do |
| 14 |
let :params do |
| 15 |
{ |
| 16 |
:token_ttl => 600, |
| 17 |
:enforce_session_timeout => false, |
| 18 |
} |
| 19 |
end |
| 20 |
|
| 21 |
it 'configures consoleauth in nova.conf' do |
| 22 |
should contain_nova_config('consoleauth/token_ttl').with_value(600) |
| 23 |
should contain_nova_config('consoleauth/enforce_session_timeout').with_value(false) |
| 24 |
end |
| 25 |
end |
| 26 |
end |
| 27 |
|
| 28 |
on_supported_os({ |
| 29 |
:supported_os => OSDefaults.get_supported_os |
| 30 |
}).each do |os,facts| |
| 31 |
context "on #{os}" do |
| 32 |
let (:facts) do |
| 33 |
facts.merge(OSDefaults.get_facts()) |
| 34 |
end |
| 35 |
|
| 36 |
it_behaves_like 'nova::consoleauth' |
| 37 |
end |
| 38 |
end |
| 39 |
end |