puppet-glare/spec/classes/glare_db_postgresql_spec.rb
Denis Egorenko 564c1f7930 puppet-glare: Initial commit
This is the initial commit for puppet-glare.
It has been automatically generated using cookiecutter[1] and msync[2]

[1] https://github.com/openstack/puppet-openstack-cookiecutter
[2] https://github.com/openstack/puppet-modulesync-configs

Change-Id: I614a3d93947705a7a74820017bc568c6de197bea
2016-09-14 17:05:00 +03:00

38 lines
824 B
Ruby

require 'spec_helper'
describe 'glare::db::postgresql' do
let :pre_condition do
'include postgresql::server'
end
let :required_params do
{ :password => 'pw' }
end
shared_examples_for 'glare-db-postgresql' do
context 'with only required parameters' do
let :params do
required_params
end
it { is_expected.to contain_postgresql__server__db('glare').with(
:user => 'glare',
:password => 'md5000e10ee12052d5996f40620414c021a'
)}
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({ :concat_basedir => '/var/lib/puppet/concat' }))
end
it_behaves_like 'glare-db-postgresql'
end
end
end