forked from cblument/puppetlabs-nova
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add spec tests for nova::volume::iscsi
- Loading branch information
Dan Bode
committed
May 25, 2012
1 parent
aecaf74
commit f875b57
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
require 'spec_helper' | ||
|
||
describe 'nova::volume::iscsi' do | ||
|
||
describe 'on debian platforms' do | ||
|
||
let :facts do | ||
{ :osfamily => 'Debian' } | ||
end | ||
it { should contain_service('tgtd').with( | ||
'name' => 'tgt', | ||
'provider' => 'upstart', | ||
# FIXME(fc): rspec complains this value is 'nil' in the catalog | ||
#'ensure' => 'stopped', | ||
'enable' => true | ||
)} | ||
it { should contain_package('tgt').with_name('tgt') } | ||
|
||
describe 'and more specifically on debian os' do | ||
let :facts do | ||
{ :osfamily => 'Debian', :operatingsystem => 'Debian' } | ||
end | ||
it { should contain_service('tgtd').with( | ||
'provider' => nil | ||
)} | ||
end | ||
|
||
it { should contain_nova_config('volume_group').with_value('nova-volumes') } | ||
it { should_not contain_nova_config('iscsi_ip_address') } | ||
|
||
end | ||
|
||
describe 'on rhel' do | ||
let :facts do | ||
{ :osfamily => 'RedHat' } | ||
end | ||
it { should contain_service('tgtd').with( | ||
'name' => 'tgtd', | ||
# FIXME(fc): rspec complains this value is 'nil' in the catalog | ||
#'ensure' => 'stopped', | ||
'enable' => true | ||
)} | ||
it { should contain_package('tgt').with_name('scsi-target-utils')} | ||
end | ||
end |