aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifests/profile/base/nova/libvirt.pp4
-rw-r--r--spec/classes/tripleo_profile_base_nova_compute_libvirt_spec.rb21
-rw-r--r--spec/classes/tripleo_profile_base_nova_libvirt_spec.rb14
-rw-r--r--spec/classes/tripleo_selinux_spec.rb2
4 files changed, 32 insertions, 9 deletions
diff --git a/manifests/profile/base/nova/libvirt.pp b/manifests/profile/base/nova/libvirt.pp
index 332e33b..83f0c38 100644
--- a/manifests/profile/base/nova/libvirt.pp
+++ b/manifests/profile/base/nova/libvirt.pp
@@ -26,6 +26,8 @@
class tripleo::profile::base::nova::libvirt (
$step = Integer(hiera('step')),
) {
+ include ::tripleo::profile::base::nova::compute_libvirt_shared
+
if $step >= 4 {
include ::tripleo::profile::base::nova
include ::tripleo::profile::base::nova::migration::client
@@ -47,6 +49,4 @@ class tripleo::profile::base::nova::libvirt (
include ::nova::compute::libvirt::qemu
}
- include ::tripleo::profile::base::nova::compute_libvirt_shared
-
}
diff --git a/spec/classes/tripleo_profile_base_nova_compute_libvirt_spec.rb b/spec/classes/tripleo_profile_base_nova_compute_libvirt_spec.rb
index db9e77e..0a9ae80 100644
--- a/spec/classes/tripleo_profile_base_nova_compute_libvirt_spec.rb
+++ b/spec/classes/tripleo_profile_base_nova_compute_libvirt_spec.rb
@@ -22,12 +22,21 @@ describe 'tripleo::profile::base::nova::compute::libvirt' do
context 'with step less than 4' do
let(:params) { { :step => 1, } }
+ let(:pre_condition) do
+ <<-eos
+ class { '::tripleo::profile::base::nova::compute_libvirt_shared':
+ step => #{params[:step]},
+ }
+eos
+ end
+
+
it {
is_expected.to contain_class('tripleo::profile::base::nova::compute::libvirt')
is_expected.to_not contain_class('tripleo::profile::base::nova')
is_expected.to_not contain_class('tripleo::profile::base::nova::compute')
- is_expected.to_not contain_class('nova::compute::libvirt')
- is_expected.to_not contain_class('nova::compute::libvirt::qemu')
+ is_expected.to_not contain_class('tripleo::profile::base::nova::migration::client')
+ is_expected.to contain_class('tripleo::profile::base::nova::compute_libvirt_shared')
}
end
@@ -38,6 +47,9 @@ describe 'tripleo::profile::base::nova::compute::libvirt' do
step => #{params[:step]},
oslomsg_rpc_hosts => [ '127.0.0.1' ],
}
+ class { '::tripleo::profile::base::nova::compute_libvirt_shared':
+ step => #{params[:step]},
+ }
class { '::tripleo::profile::base::nova::compute':
step => #{params[:step]},
}
@@ -54,10 +66,9 @@ eos
it {
is_expected.to contain_class('tripleo::profile::base::nova::compute::libvirt')
- is_expected.to contain_class('tripleo::profile::base::nova')
is_expected.to contain_class('tripleo::profile::base::nova::compute')
- is_expected.to contain_class('nova::compute::libvirt')
- is_expected.to contain_class('nova::compute::libvirt::qemu')
+ is_expected.to contain_class('tripleo::profile::base::nova::migration::client')
+ is_expected.to contain_class('tripleo::profile::base::nova::compute_libvirt_shared')
}
end
end
diff --git a/spec/classes/tripleo_profile_base_nova_libvirt_spec.rb b/spec/classes/tripleo_profile_base_nova_libvirt_spec.rb
index d9a06b2..0734a0f 100644
--- a/spec/classes/tripleo_profile_base_nova_libvirt_spec.rb
+++ b/spec/classes/tripleo_profile_base_nova_libvirt_spec.rb
@@ -21,9 +21,16 @@ describe 'tripleo::profile::base::nova::libvirt' do
context 'with step less than 4' do
let(:params) { { :step => 1, } }
-
+ let(:pre_condition) do
+ <<-eos
+ class { '::tripleo::profile::base::nova::compute_libvirt_shared':
+ step => #{params[:step]}
+ }
+eos
+ end
it {
is_expected.to contain_class('tripleo::profile::base::nova::libvirt')
+ is_expected.to contain_class('tripleo::profile::base::nova::compute_libvirt_shared')
is_expected.to_not contain_class('tripleo::profile::base::nova')
is_expected.to_not contain_class('nova::compute::libvirt::services')
is_expected.to_not contain_file('/etclibvirt/qemu/networks/autostart/default.xml')
@@ -45,6 +52,9 @@ describe 'tripleo::profile::base::nova::libvirt' do
class { '::tripleo::profile::base::nova::migration::client':
step => #{params[:step]}
}
+ class { '::tripleo::profile::base::nova::compute_libvirt_shared':
+ step => #{params[:step]}
+ }
eos
end
@@ -52,8 +62,10 @@ eos
it {
is_expected.to contain_class('tripleo::profile::base::nova::libvirt')
+ is_expected.to contain_class('tripleo::profile::base::nova::compute_libvirt_shared')
is_expected.to contain_class('tripleo::profile::base::nova')
is_expected.to contain_class('nova::compute::libvirt::services')
+ is_expected.to contain_class('nova::compute::libvirt::qemu')
is_expected.to contain_file('/etc/libvirt/qemu/networks/autostart/default.xml').with_ensure('absent')
is_expected.to contain_file('/etc/libvirt/qemu/networks/default.xml').with_ensure('absent')
is_expected.to contain_exec('libvirt-default-net-destroy')
diff --git a/spec/classes/tripleo_selinux_spec.rb b/spec/classes/tripleo_selinux_spec.rb
index f49f87b..2e017b9 100644
--- a/spec/classes/tripleo_selinux_spec.rb
+++ b/spec/classes/tripleo_selinux_spec.rb
@@ -58,7 +58,7 @@ describe 'tripleo::selinux' do
context 'with selinux disabled' do
before :each do
- facts.merge!({ :selinux => 'false' })
+ facts.merge!({ :selinux => false })
end
let :params do