Skip to content

Commit 4c85eee

Browse files
author
Ashley Penney
committed
Fixes to get the tests running on Ubuntu 14.04.
1 parent f75dbbf commit 4c85eee

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
HOSTS:
2+
ubuntu-server-1404-x64:
3+
roles:
4+
- master
5+
platform: ubuntu-14.04-64
6+
box: puppetlabs/ubuntu-14.04-64-nocm
7+
hypervisor : vagrant
8+
CONFIG:
9+
type: foss

spec/acceptance/server/config_entry_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ class { 'postgresql::server': }
2828
pp = <<-EOS.unindent
2929
class { 'postgresql::server': }
3030
31-
postgresql::server::config_entry { 'test_listen_addresses':
32-
value => '0.0.0.0',
31+
postgresql::server::config_entry { 'log_directory':
32+
value => '/tmp/testfile',
3333
}
3434
EOS
3535

3636
apply_manifest(pp, :catch_failures => true)
3737

3838
psql('--command="show all" postgres') do |r|
39-
r.stdout.should =~ /test_listen_adresses.+0\.0\.0\.0/
39+
r.stdout.should =~ /log_directory.+\/tmp\/testfile/
4040
r.stderr.should be_empty
4141
r.exit_code.should == 0
4242
end

spec/acceptance/server_spec.rb

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
require 'spec_helper_acceptance'
22

3+
# Hack around the fact that so far only Ubuntu 14.04 seems to have moved this
4+
# file. Can revisit if everyone else gets clever.
5+
if fact('operatingsystem') == 'Ubuntu' && fact('operatingsystemrelease') == '14.04'
6+
pghba_file = '/etc/postgresql/9.3/main/pg_hba.conf'
7+
else
8+
pghba_file = '/var/lib/pgsql/data/pg_hba.conf'
9+
end
10+
311
describe 'server:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
412
after :all do
513
# Cleanup after tests have ran
@@ -19,7 +27,7 @@ class { 'postgresql::server': }
1927
it { should be_listening }
2028
end
2129

22-
describe file('/var/lib/pgsql/data/pg_hba.conf') do
30+
describe file(pghba_file) do
2331
it { should be_file }
2432
it { should be_owned_by 'postgres' }
2533
it { should be_grouped_into 'postgres' }

0 commit comments

Comments
 (0)