Commit 5e6395b3 authored by Martin Pitt's avatar Martin Pitt

Minor test suite variable cleanup.

parent 7e64aae8
......@@ -6,8 +6,9 @@ postgresql-common (34) unstable; urgency=low
Debian sid/testing, Ubuntu 5.10 and Ubuntu 6.04.
* debian/postgresql-common.config: Remove hardcoded versions, use
supported-versions now.
* Minor test suite variable cleanup.
-- Martin Pitt <mpitt@debian.org> Tue, 22 Nov 2005 00:51:42 +0100
-- Martin Pitt <mpitt@debian.org> Tue, 22 Nov 2005 01:11:05 +0100
postgresql-common (33) unstable; urgency=low
......
......@@ -10,7 +10,7 @@ use Test::More tests => 4;
use lib 't';
use TestLib;
like_program_out 0, 'psql --version', 0, qr/^psql \(PostgreSQL\) $LATEST_MAJOR\.\d\b/,
like_program_out 0, 'psql --version', 0, qr/^psql \(PostgreSQL\) $MAJORS[-1]\.\d\b/,
'pg_wrapper selects highest available version number';
like_program_out 0, 'psql -h 127.0.0.1 -l', 2, qr/could not connect/,
......
......@@ -11,7 +11,7 @@ use Test::More tests => 37;
use lib '/usr/share/postgresql-common';
use PgCommon;
my $version = $LATEST_MAJOR;
my $version = $MAJORS[-1];
my $socketdir = '/tmp/postgresql-testsuite/';
my ($pg_uid, $pg_gid) = (getpwnam 'postgres')[2,3];
......
......@@ -47,7 +47,7 @@ like $$outref, qr/Success. Please check/, 'pg_upgradecluster reported successful
# Check clusters
is_program_out 'nobody', 'pg_lsclusters -h', 0,
"$MAJORS[0] upgr 5433 down postgres /var/lib/postgresql/$MAJORS[0]/upgr /var/log/postgresql/postgresql-$MAJORS[0]-upgr.log
$LATEST_MAJOR upgr 5432 online postgres /var/lib/postgresql/$LATEST_MAJOR/upgr /var/log/postgresql/postgresql-$LATEST_MAJOR-upgr.log
$MAJORS[-1] upgr 5432 online postgres /var/lib/postgresql/$MAJORS[-1]/upgr /var/log/postgresql/postgresql-$MAJORS[-1]-upgr.log
", 'pg_lsclusters output';
# Check that SELECT output is identical
......@@ -65,7 +65,7 @@ testnc|f
# stop servers, clean up
is ((system "pg_dropcluster $MAJORS[0] upgr --stop-server"), 0, 'Dropping original cluster');
is ((system "pg_dropcluster $LATEST_MAJOR upgr --stop-server"), 0, 'Dropping upgraded cluster');
is ((system "pg_dropcluster $MAJORS[-1] upgr --stop-server"), 0, 'Dropping upgraded cluster');
# Check clusters
is_program_out 'postgres', 'pg_lsclusters -h', 0, '', 'empty pg_lsclusters output';
......
......@@ -56,9 +56,9 @@ check_cluster $MAJORS[0], 'en_US', 1;
check_cluster $MAJORS[0], 'en_US', 1, 'UTF-8';
check_cluster $MAJORS[0], 'en_US.UTF-8', 1;
check_cluster $LATEST_MAJOR, 'en_US', 1;
check_cluster $LATEST_MAJOR, 'en_US', 1, 'UTF-8';
check_cluster $LATEST_MAJOR, 'en_US.UTF-8', 1;
check_cluster $MAJORS[-1], 'en_US', 1;
check_cluster $MAJORS[-1], 'en_US', 1, 'UTF-8';
check_cluster $MAJORS[-1], 'en_US.UTF-8', 1;
# Check clusters
is_program_out 'postgres', 'pg_lsclusters -h', 0, '', 'empty pg_lsclusters output';
......
......@@ -9,10 +9,11 @@ use Test::More;
our $VERSION = 1.00;
our @ISA = ('Exporter');
our @EXPORT = qw/ps ok_dir exec_as deb_installed is_program_out
like_program_out unlike_program_out @MAJORS $LATEST_MAJOR/;
like_program_out unlike_program_out @MAJORS/;
our @MAJORS = ('7.4', '8.0', '8.1');
our $LATEST_MAJOR = $MAJORS[-1];
use lib '/usr/share/postgresql-common';
use PgCommon qw/get_versions/;
our @MAJORS = get_versions;
# Return whether a given deb is installed.
# Arguments: <deb name>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment