2104bc4991
... but only assert the inputs for the defined resource type. This allows us to avoid unit test failure caused by changes in underlying modules. Change-Id: Iabcf453028e284ee3cc5ede1bb637b79cedf1fea
49 lines
1.1 KiB
Ruby
49 lines
1.1 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'ironic::db::postgresql' do
|
|
|
|
shared_examples_for 'ironic::db::postgresql' do
|
|
let :req_params do
|
|
{ :password => 'ironicpass' }
|
|
end
|
|
|
|
let :pre_condition do
|
|
'include postgresql::server'
|
|
end
|
|
|
|
context 'with only required parameters' do
|
|
let :params do
|
|
req_params
|
|
end
|
|
|
|
it { is_expected.to contain_class('ironic::deps') }
|
|
|
|
it { is_expected.to contain_openstacklib__db__postgresql('ironic').with(
|
|
:user => 'ironic',
|
|
:password => 'ironicpass',
|
|
:dbname => 'ironic',
|
|
:encoding => nil,
|
|
:privileges => 'ALL',
|
|
)}
|
|
end
|
|
|
|
end
|
|
|
|
on_supported_os({
|
|
:supported_os => OSDefaults.get_supported_os
|
|
}).each do |os,facts|
|
|
context "on #{os}" do
|
|
let (:facts) do
|
|
facts.merge(OSDefaults.get_facts({
|
|
# puppet-postgresql requires the service_provider fact provided by
|
|
# puppetlabs-postgresql.
|
|
:service_provider => 'systemd'
|
|
}))
|
|
end
|
|
|
|
it_behaves_like 'ironic::db::postgresql'
|
|
end
|
|
end
|
|
|
|
end
|