File: 010_defaultport_cluster.t

package info (click to toggle)
postgresql-common 113%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 688 kB
  • ctags: 100
  • sloc: perl: 2,249; sh: 387; makefile: 11
file content (18 lines) | stat: -rw-r--r-- 641 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# We try to call psql with --version and then on localhost. Since there are no
# clusters, we expect an error message that the connection to port 5432 is
# refused. This checks that pg_wrapper correctly picks the default port and
# uses the highest available version.

use strict;
use Test::More tests => 4;

use lib 't';
use TestLib;

like_program_out 0, 'psql --version', 0, qr/^psql \(PostgreSQL\) $MAJORS[-1]/, 
    'pg_wrapper selects highest available version number';

like_program_out 0, 'env LC_MESSAGES=C psql -h 127.0.0.1 -l', 2, qr/could not connect/, 
    'connecting to localhost fails with no clusters';

# vim: filetype=perl