2013-07-30 01:57:22 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2013-08-27 22:43:47 +02:00
|
|
|
describe 'postgresql::server::config_entry', :type => :define do
|
2013-07-30 01:57:22 +02:00
|
|
|
let :facts do
|
|
|
|
{
|
|
|
|
:osfamily => 'RedHat',
|
2013-08-27 22:43:47 +02:00
|
|
|
:operatingsystem => 'RedHat',
|
|
|
|
:operatingsystemrelease => '6.4',
|
2014-04-08 16:40:49 +02:00
|
|
|
:kernel => 'Linux',
|
|
|
|
:concat_basedir => tmpfilename('contrib'),
|
|
|
|
:id => 'root',
|
|
|
|
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
|
2013-07-30 01:57:22 +02:00
|
|
|
}
|
|
|
|
end
|
2013-08-27 22:43:47 +02:00
|
|
|
|
2013-07-30 01:57:22 +02:00
|
|
|
let(:title) { 'config_entry'}
|
2013-08-27 22:43:47 +02:00
|
|
|
|
2013-07-30 01:57:22 +02:00
|
|
|
let :target do
|
|
|
|
tmpfilename('postgresql_conf')
|
|
|
|
end
|
2013-08-27 22:43:47 +02:00
|
|
|
|
2013-07-30 01:57:22 +02:00
|
|
|
context "syntax check" do
|
2014-04-08 16:40:49 +02:00
|
|
|
let :pre_condition do
|
|
|
|
"class {'postgresql::server':}"
|
|
|
|
end
|
|
|
|
|
2013-07-30 01:57:22 +02:00
|
|
|
let(:params) { { :ensure => 'present'} }
|
2014-07-09 18:04:43 +02:00
|
|
|
it { is_expected.to contain_postgresql__server__config_entry('config_entry') }
|
2013-07-30 01:57:22 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|