Create acceptance test for pgdata
This commit is contained in:
parent
a00eab6937
commit
7828cf3f73
1 changed files with 24 additions and 0 deletions
24
spec/acceptance/alternative_pgdata_spec.rb
Normal file
24
spec/acceptance/alternative_pgdata_spec.rb
Normal 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
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue