1 require 'spec_helper_acceptance'
3 describe 'postgresql::server::config_entry' do
5 let(:pp_setup) { <<-EOS
6 class { 'postgresql::server':
7 postgresql_conf_path => '/tmp/postgresql.conf',
12 context 'unix_socket_directories' do
13 let(:pp_test) { pp_setup + <<-EOS
14 postgresql::server::config_entry { 'unix_socket_directories':
15 value => '/var/socket/, /root/'
20 #get postgresql version
21 apply_manifest("class { 'postgresql::server': }")
22 result = shell('psql --version')
23 version = result.stdout.match(%r{\s(\d\.\d)})[1]
26 it 'is expected to run idempotently' do
27 apply_manifest(pp_test, :catch_failures => true)
28 apply_manifest(pp_test, :catch_changes => true)
31 it 'is expected to contain directories' do
32 shell('cat /tmp/postgresql.conf') do |output|
33 expect(output.stdout).to contain("unix_socket_directories = '/var/socket/, /root/'")