Files
puppet-nova/spec/classes/nova_compute_xenserver_spec.rb
Mathieu Gagné e684c73c48 Add rspec tests for nova::compute::xenserver
Add missing rspec tests for nova::compute::xenserver

Change-Id: I903898292fc2a540eb52e9bb27edcce3368b243f
2013-05-22 18:19:51 -04:00

30 lines
1.1 KiB
Ruby

require 'spec_helper'
describe 'nova::compute::xenserver' do
let :params do
{ :xenapi_connection_url => 'https://127.0.0.1',
:xenapi_connection_username => 'root',
:xenapi_connection_password => 'passw0rd' }
end
context 'with required parameters' do
it 'configures xenapi in nova.conf' do
should contain_nova_config('DEFAULT/compute_driver').with_value('xenapi.XenAPIDriver')
should contain_nova_config('DEFAULT/connection_type').with_value('xenapi')
should contain_nova_config('DEFAULT/xenapi_connection_url').with_value(params[:xenapi_connection_url])
should contain_nova_config('DEFAULT/xenapi_connection_username').with_value(params[:xenapi_connection_username])
should contain_nova_config('DEFAULT/xenapi_connection_password').with_value(params[:xenapi_connection_password])
should contain_nova_config('DEFAULT/xenapi_inject_image').with_value(false)
end
it 'installs xenapi with pip' do
should contain_package('xenapi').with(
:ensure => 'present',
:provider => 'pip'
)
end
end
end