| 1 |
require 'spec_helper' |
| 2 |
|
| 3 |
describe 'nova::db::postgresql_api' do |
| 4 |
|
| 5 |
shared_examples_for 'nova::db::postgresql' do |
| 6 |
let :req_params do |
| 7 |
{ :password => 'novapass' } |
| 8 |
end |
| 9 |
|
| 10 |
let :pre_condition do |
| 11 |
'include postgresql::server' |
| 12 |
end |
| 13 |
|
| 14 |
context 'with only required parameters' do |
| 15 |
let :params do |
| 16 |
req_params |
| 17 |
end |
| 18 |
|
| 19 |
it { is_expected.to contain_openstacklib__db__postgresql('nova_api').with( |
| 20 |
:user => 'nova_api', |
| 21 |
:password => 'novapass', |
| 22 |
:dbname => 'nova_api', |
| 23 |
:encoding => nil, |
| 24 |
:privileges => 'ALL', |
| 25 |
)} |
| 26 |
end |
| 27 |
end |
| 28 |
|
| 29 |
on_supported_os({ |
| 30 |
:supported_os => OSDefaults.get_supported_os |
| 31 |
}).each do |os,facts| |
| 32 |
context "on #{os}" do |
| 33 |
let (:facts) do |
| 34 |
facts.merge(OSDefaults.get_facts({ |
| 35 |
# puppet-postgresql requires the service_provider fact provided by |
| 36 |
# puppetlabs-postgresql. |
| 37 |
:service_provider => 'systemd' |
| 38 |
})) |
| 39 |
end |
| 40 |
|
| 41 |
it_configures 'nova::db::postgresql' |
| 42 |
end |
| 43 |
end |
| 44 |
|
| 45 |
end |