2013-10-02 21:38:20 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'postgresql::server::initdb', :type => :class do
|
|
|
|
let (:pre_condition) do
|
|
|
|
"include postgresql::server"
|
|
|
|
end
|
|
|
|
describe 'on RedHat' do
|
|
|
|
let :facts do
|
|
|
|
{
|
|
|
|
:osfamily => 'RedHat',
|
|
|
|
:operatingsystem => 'CentOS',
|
|
|
|
:operatingsystemrelease => '6.0',
|
|
|
|
:concat_basedir => tmpfilename('server'),
|
2014-04-08 16:40:49 +02:00
|
|
|
:kernel => 'Linux',
|
|
|
|
:id => 'root',
|
|
|
|
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
|
2013-10-02 21:38:20 +02:00
|
|
|
}
|
|
|
|
end
|
|
|
|
it { should contain_file('/var/lib/pgsql/data').with_ensure('directory') }
|
|
|
|
end
|
|
|
|
describe 'on Amazon' do
|
|
|
|
let :facts do
|
|
|
|
{
|
|
|
|
:osfamily => 'RedHat',
|
|
|
|
:operatingsystem => 'Amazon',
|
2014-05-12 23:21:21 +02:00
|
|
|
:operatingsystemrelease => '1.0',
|
2013-10-02 21:38:20 +02:00
|
|
|
:concat_basedir => tmpfilename('server'),
|
2014-04-08 16:40:49 +02:00
|
|
|
:kernel => 'Linux',
|
|
|
|
:id => 'root',
|
|
|
|
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
|
2013-10-02 21:38:20 +02:00
|
|
|
}
|
|
|
|
end
|
|
|
|
it { should contain_file('/var/lib/pgsql9/data').with_ensure('directory') }
|
|
|
|
end
|
2013-12-01 03:02:16 +01:00
|
|
|
end
|
|
|
|
|