Create acceptance test for pgdata

This commit is contained in:
Martin Jackson 2014-08-21 21:58:11 -05:00
parent a00eab6937
commit 7828cf3f73

View file

@ -0,0 +1,24 @@
require 'spec_helper_acceptance'
# These tests ensure that postgres can change itself to an alternative pgdata
# location properly.
describe 'postgres::server', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
it 'on an alternative pgdata location' do
pp = <<-EOS
class { 'postgresql::server': data_directory => '/var/pgsql' }
EOS
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)
end
it 'can connect with psql' do
psql('-D /var/pgsql --command="\l" postgres', 'postgres') do |r|
expect(r.stdout).to match(/List of databases/)
end
end
end