commit
3877a01224
2 changed files with 5 additions and 2 deletions
|
@ -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]) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue