| 1 |
require 'spec_helper' |
| 2 |
|
| 3 |
describe 'nova::compute::serial' do |
| 4 |
shared_examples 'nova::compute::serial' do |
| 5 |
context 'with defaults' do |
| 6 |
it 'configures defaults' do |
| 7 |
should contain_nova_config('serial_console/enabled').with_value('true') |
| 8 |
should contain_nova_config('serial_console/port_range').with_value('<SERVICE DEFAULT>') |
| 9 |
should contain_nova_config('serial_console/base_url').with_value('<SERVICE DEFAULT>') |
| 10 |
should contain_nova_config('serial_console/proxyclient_address').with_value('<SERVICE DEFAULT>') |
| 11 |
end |
| 12 |
end |
| 13 |
|
| 14 |
context 'when overriding params' do |
| 15 |
let :params do |
| 16 |
{ |
| 17 |
:port_range => '10000:20000', |
| 18 |
:base_url => 'ws://127.0.0.1:6083/', |
| 19 |
:proxyclient_address => '127.0.0.1', |
| 20 |
} |
| 21 |
end |
| 22 |
|
| 23 |
it 'configures the parameters' do |
| 24 |
should contain_nova_config('serial_console/enabled').with_value('true') |
| 25 |
should contain_nova_config('serial_console/port_range').with_value('10000:20000') |
| 26 |
should contain_nova_config('serial_console/base_url').with_value('ws://127.0.0.1:6083/') |
| 27 |
should contain_nova_config('serial_console/proxyclient_address').with_value('127.0.0.1') |
| 28 |
end |
| 29 |
end |
| 30 |
end |
| 31 |
|
| 32 |
on_supported_os({ |
| 33 |
:supported_os => OSDefaults.get_supported_os |
| 34 |
}).each do |os,facts| |
| 35 |
context "on #{os}" do |
| 36 |
let (:facts) do |
| 37 |
facts.merge!(OSDefaults.get_facts()) |
| 38 |
end |
| 39 |
|
| 40 |
it_behaves_like 'nova::compute::serial' |
| 41 |
end |
| 42 |
end |
| 43 |
end |