Merge pull request #273 from ares/master

Expose owner in db definition
This commit is contained in:
Ashley Penney 2013-10-14 09:10:51 -07:00
commit 3877a01224
2 changed files with 5 additions and 2 deletions

View file

@ -7,13 +7,15 @@ define postgresql::server::db (
$locale = $postgresql::server::locale,
$grant = 'ALL',
$tablespace = undef,
$istemplate = false
$istemplate = false,
$owner = undef
) {
postgresql::server::database { $name:
encoding => $encoding,
tablespace => $tablespace,
locale => $locale,
istemplate => $istemplate,
owner => $owner,
}
if ! defined(Postgresql::Server::Role[$user]) {

View file

@ -17,11 +17,12 @@ describe 'postgresql::server::db', :type => :define do
{
:user => 'test',
:password => 'test',
:owner => 'tester',
}
end
it { should contain_postgresql__server__db('test') }
it { should contain_postgresql__server__database('test') }
it { should contain_postgresql__server__database('test').with_owner('tester') }
it { should contain_postgresql__server__role('test') }
it { should contain_postgresql__server__database_grant('GRANT test - ALL - test') }
end