/
openstack_provision_spec.rb
55 lines (46 loc) · 1.31 KB
/
openstack_provision_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
require 'spec_helper'
describe 'openstack::provision' do
let :facts do
{
:osfamily => 'Debian'
}
end
describe 'should be possible to override resize_available' do
let :params do
{
:configure_tempest => true,
:resize_available => true,
:change_password_available => true,
:tempest_repo_revision => 'stable/grizzly'
}
end
it { should contain_class('tempest').with(
:resize_available => true,
:change_password_available => true,
:tempest_repo_revision => 'stable/grizzly'
) }
it 'should configure neutron networks' do
should contain_neutron_network('public').with(
'ensure' => 'present',
'router_external' => true,
'tenant_name' => 'admin'
)
should contain_neutron_network('private').with(
'ensure' => 'present',
'tenant_name' => 'demo'
)
end
end
describe 'should be possible to provision with neutron disabled' do
let :params do
{
:configure_tempest => true,
:neutron_available => false,
:tempest_repo_revision => 'stable/grizzly'
}
end
it { should contain_class('tempest').with(
:tempest_repo_revision => 'stable/grizzly'
) }
end
end