Files
puppet-nova/spec/classes/nova_config_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

31 lines
1.1 KiB
Ruby

require 'spec_helper'
describe 'nova::config' do
let :params do
{ :nova_config => {
'DEFAULT/foo' => { 'value' => 'fooValue' },
'DEFAULT/bar' => { 'value' => 'barValue' },
'DEFAULT/baz' => { 'ensure' => 'absent' }
},
:nova_paste_api_ini => {
'DEFAULT/foo2' => { 'value' => 'fooValue' },
'DEFAULT/bar2' => { 'value' => 'barValue' },
'DEFAULT/baz2' => { 'ensure' => 'absent' }
}
}
end
it 'configures arbitrary nova configurations' do
is_expected.to contain_nova_config('DEFAULT/foo').with_value('fooValue')
is_expected.to contain_nova_config('DEFAULT/bar').with_value('barValue')
is_expected.to contain_nova_config('DEFAULT/baz').with_ensure('absent')
end
it 'configures arbitrary nova api-paste configurations' do
is_expected.to contain_nova_paste_api_ini('DEFAULT/foo2').with_value('fooValue')
is_expected.to contain_nova_paste_api_ini('DEFAULT/bar2').with_value('barValue')
is_expected.to contain_nova_paste_api_ini('DEFAULT/baz2').with_ensure('absent')
end
end