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.
Merge pull request #116 from bodepd/network_project
Project should be set
- Loading branch information
Showing
2 changed files
with
57 additions
and
1 deletion.
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
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,56 @@ | ||
require 'spec_helper' | ||
|
||
describe 'nova::manage::network' do | ||
|
||
let :facts do | ||
{:osfamily => 'RedHat'} | ||
end | ||
|
||
let :pre_condition do | ||
'include nova' | ||
end | ||
|
||
let :title do | ||
'foo' | ||
end | ||
|
||
describe 'with only required parameters' do | ||
let :params do | ||
{ | ||
:network => '10.0.0.0/24' | ||
} | ||
end | ||
it { should contain_nova_network('foo').with( | ||
:ensure => 'present', | ||
:network => '10.0.0.0/24', | ||
:num_networks => 1, | ||
:project => nil, | ||
:notify => 'Exec[nova-db-sync]' | ||
) } | ||
end | ||
describe 'when overriding num networks' do | ||
let :params do | ||
{ | ||
:network => '10.0.0.0/20', | ||
:num_networks => 2 | ||
} | ||
end | ||
it { should contain_nova_network('foo').with( | ||
:network => '10.0.0.0/20', | ||
:num_networks => 2 | ||
) } | ||
end | ||
|
||
describe 'when overriding projects' do | ||
let :params do | ||
{ | ||
:network => '10.0.0.0/20', | ||
:project => 'foo' | ||
} | ||
end | ||
it { should contain_nova_network('foo').with( | ||
:network => '10.0.0.0/20', | ||
:project => 'foo' | ||
) } | ||
end | ||
end |