module-postgresql/spec/acceptance/default_parameters_spec.rb
Sebastian Gerhards 2a78c474a3 Fix postgresql::server acceptance test descriptions
The descriptions of the acceptance tests should match the class under
test, i.e. postgresql::server.
2016-01-28 15:26:14 +01:00

28 lines
697 B
Ruby

require 'spec_helper_acceptance'
# These tests are designed to ensure that the module, when ran with defaults,
# sets up everything correctly and allows us to connect to Postgres.
describe 'postgresql::server', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
it 'with defaults' do
pp = <<-EOS
class { 'postgresql::server': }
EOS
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)
end
describe port(5432) do
it { is_expected.to be_listening }
end
it 'can connect with psql' do
psql('--command="\l" postgres', 'postgres') do |r|
expect(r.stdout).to match(/List of databases/)
end
end
end