2013-08-27 22:43:47 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'postgresql::server::table_grant', :type => :define do
|
|
|
|
let :facts do
|
|
|
|
{
|
|
|
|
:osfamily => 'Debian',
|
|
|
|
:operatingsystem => 'Debian',
|
|
|
|
:operatingsystemrelease => '6.0',
|
2014-04-08 16:40:49 +02:00
|
|
|
:kernel => 'Linux',
|
|
|
|
:concat_basedir => tmpfilename('table_grant'),
|
|
|
|
:id => 'root',
|
|
|
|
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
|
2013-08-27 22:43:47 +02:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
let :title do
|
|
|
|
'test'
|
|
|
|
end
|
|
|
|
|
|
|
|
let :params do
|
|
|
|
{
|
|
|
|
:privilege => 'ALL',
|
|
|
|
:db => 'test',
|
|
|
|
:role => 'test',
|
|
|
|
:table => 'foo',
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2014-04-08 16:40:49 +02:00
|
|
|
let :pre_condition do
|
|
|
|
"class {'postgresql::server':}"
|
|
|
|
end
|
|
|
|
|
2014-07-09 18:04:43 +02:00
|
|
|
it { is_expected.to contain_postgresql__server__table_grant('test') }
|
|
|
|
it { is_expected.to contain_postgresql__server__grant('table:test') }
|
2013-08-27 22:43:47 +02:00
|
|
|
end
|