
This file is to be included by all puppet modules. First feature is to make sure that allow_virtual is set to true for all openstack modules. It's set to false for puppet 3.6.1 to 4.0.0 [1] [1] https://docs.puppet.com/puppet/3.6/reference/release_notes.html#puppet-361 Change-Id: I9d0a10d48124ee71ea80134ceef96436c8ee196e Closes-Bug: 1599113 Related-Bug: 1597753 Depends-On: I2699eaa3a10589c9a0c680bb1de489994fe01b67
34 lines
1.0 KiB
Ruby
34 lines
1.0 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'openstacklib::defaults', type: :class do
|
|
on_supported_os.each do |os, facts|
|
|
let(:pre_condition) do
|
|
<<-eof
|
|
package { 'my_virt_package' :
|
|
ensure => present,
|
|
tag => 'openstack'
|
|
}
|
|
eof
|
|
end
|
|
|
|
context "Puppet < 4.0.0" do
|
|
context "on #{os}" do
|
|
let(:facts) { facts.merge(:puppetversion => '3.8.0') }
|
|
it { is_expected.to compile.with_all_deps }
|
|
it { is_expected.to contain_class('openstacklib::defaults') }
|
|
it { is_expected.to contain_package('my_virt_package')
|
|
.with(:allow_virtual => true)}
|
|
end
|
|
end
|
|
context "Puppet >= 4.0.0" do
|
|
context "on #{os}" do
|
|
let(:facts) { facts.merge(:puppetversion => '4.0.0') }
|
|
it { is_expected.to compile.with_all_deps }
|
|
it { is_expected.to contain_class('openstacklib::defaults') }
|
|
it { is_expected.to contain_package('my_virt_package')
|
|
.without(:allow_virtual)}
|
|
end
|
|
end
|
|
end
|
|
end
|