commit
7fb35f52c1
4 changed files with 22 additions and 5 deletions
9
spec/acceptance/nodesets/ubuntu-server-1404-x64.yml
Normal file
9
spec/acceptance/nodesets/ubuntu-server-1404-x64.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
HOSTS:
|
||||||
|
ubuntu-server-1404-x64:
|
||||||
|
roles:
|
||||||
|
- master
|
||||||
|
platform: ubuntu-14.04-64
|
||||||
|
box: puppetlabs/ubuntu-14.04-64-nocm
|
||||||
|
hypervisor : vagrant
|
||||||
|
CONFIG:
|
||||||
|
type: foss
|
|
@ -28,15 +28,15 @@ describe 'postgresql::server::config_entry:', :unless => UNSUPPORTED_PLATFORMS.i
|
||||||
pp = <<-EOS.unindent
|
pp = <<-EOS.unindent
|
||||||
class { 'postgresql::server': }
|
class { 'postgresql::server': }
|
||||||
|
|
||||||
postgresql::server::config_entry { 'listen_addresses':
|
postgresql::server::config_entry { 'log_directory':
|
||||||
value => '0.0.0.0',
|
value => '/tmp/testfile',
|
||||||
}
|
}
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
apply_manifest(pp, :catch_failures => true)
|
apply_manifest(pp, :catch_failures => true)
|
||||||
|
|
||||||
psql('--command="show all" postgres') do |r|
|
psql('--command="show all" postgres') do |r|
|
||||||
r.stdout.should =~ /listen_adresses.+0\.0\.0\.0/
|
r.stdout.should =~ /log_directory.+\/tmp\/testfile/
|
||||||
r.stderr.should be_empty
|
r.stderr.should be_empty
|
||||||
r.exit_code.should == 0
|
r.exit_code.should == 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
require 'spec_helper_acceptance'
|
require 'spec_helper_acceptance'
|
||||||
|
|
||||||
|
# Hack around the fact that so far only Ubuntu 14.04 seems to have moved this
|
||||||
|
# file. Can revisit if everyone else gets clever.
|
||||||
|
if fact('operatingsystem') == 'Ubuntu' && fact('operatingsystemrelease') == '14.04'
|
||||||
|
pghba_file = '/etc/postgresql/9.3/main/pg_hba.conf'
|
||||||
|
else
|
||||||
|
pghba_file = '/var/lib/pgsql/data/pg_hba.conf'
|
||||||
|
end
|
||||||
|
|
||||||
describe 'server:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
describe 'server:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||||
after :all do
|
after :all do
|
||||||
# Cleanup after tests have ran
|
# Cleanup after tests have ran
|
||||||
|
@ -19,7 +27,7 @@ describe 'server:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily'))
|
||||||
it { should be_listening }
|
it { should be_listening }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe file('/var/lib/pgsql/data/pg_hba.conf') do
|
describe file(pghba_file) do
|
||||||
it { should be_file }
|
it { should be_file }
|
||||||
it { should be_owned_by 'postgres' }
|
it { should be_owned_by 'postgres' }
|
||||||
it { should be_grouped_into 'postgres' }
|
it { should be_grouped_into 'postgres' }
|
||||||
|
|
|
@ -40,8 +40,8 @@ unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
|
||||||
else
|
else
|
||||||
install_puppet
|
install_puppet
|
||||||
end
|
end
|
||||||
on hosts, "mkdir -p #{host['distmoduledir']}"
|
|
||||||
hosts.each do |host|
|
hosts.each do |host|
|
||||||
|
shell("mkdir -p #{host['distmoduledir']}")
|
||||||
if ! host.is_pe?
|
if ! host.is_pe?
|
||||||
# Augeas is only used in one place, for Redhat.
|
# Augeas is only used in one place, for Redhat.
|
||||||
if fact('osfamily') == 'RedHat'
|
if fact('osfamily') == 'RedHat'
|
||||||
|
|
Loading…
Reference in a new issue