Files
puppet-nova/spec/classes/nova_compute_serial_spec.rb
Sebastien Badia b8a187f54c spec: updates for rspec-puppet 2.x and rspec 3.x
This patch aim to update our specs test in order to work with the
rspec-puppet release 2.0.0, in the mean time, we update rspec syntax
order to be prepared for rspec 3.x move.

In details:

 * Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0
 * Use shared_examples "a Puppet::Error" for puppet::error tests *
 * Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x) *
 * Fix spec tests for rspec-puppet 2.0.0
 * Clean Gemfile (remove over-specificication of runtime deps of puppetlabs_spec_helper)

Change-Id: I172439c6ed185bb38b325b2524cab1475cdc7504
2015-03-19 18:45:08 +01:00

22 lines
944 B
Ruby

require 'spec_helper'
describe 'nova::compute::serial' do
it { is_expected.to contain_nova_config('serial_console/enabled').with_value('true') }
it { is_expected.to contain_nova_config('serial_console/port_range').with_value('10000:20000')}
it { is_expected.to contain_nova_config('serial_console/base_url').with_value('ws://127.0.0.1:6083/')}
it { is_expected.to contain_nova_config('serial_console/listen').with_value('127.0.0.1')}
it { is_expected.to contain_nova_config('serial_console/proxyclient_address').with_value('127.0.0.1')}
context 'when overriding params' do
let :params do
{
:proxyclient_address => '10.10.10.10',
:listen => '10.10.11.11',
}
end
it { is_expected.to contain_nova_config('serial_console/proxyclient_address').with_value('10.10.10.10')}
it { is_expected.to contain_nova_config('serial_console/listen').with_value('10.10.11.11')}
end
end