diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/classes/tripleo_profile_base_nova_compute_libvirt_spec.rb | 21 | ||||
-rw-r--r-- | spec/classes/tripleo_profile_base_nova_libvirt_spec.rb | 14 | ||||
-rw-r--r-- | spec/classes/tripleo_selinux_spec.rb | 2 |
3 files changed, 30 insertions, 7 deletions
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 |