Commit 6c95be57 authored by Christoph Berg's avatar Christoph Berg

pg_upgradecluster, t/030_errors.t: Unbreak after we changed the old=new error message.

parent 4bdf3041
postgresql-common (170) UNRELEASED; urgency=medium
* t/025_logging.t: Improve syslog detection in the test environment.
* pg_upgradecluster, t/030_errors.t: Unbreak after we changed the old=new
error message.
-- Christoph Berg <myon@debian.org> Thu, 04 Jun 2015 16:44:18 +0200
-- Christoph Berg <christoph.berg@credativ.de> Fri, 05 Jun 2015 14:54:44 +0200
postgresql-common (169) unstable; urgency=medium
......
......@@ -293,14 +293,14 @@ $newcluster ||= $cluster; # use old cluster name by default
my $datadir;
($datadir) = $ARGV[2] =~ /(.*)/ if defined $ARGV[2];
error "cluster $version/$cluster is already on version $newversion. " .
"(The newest version installed on this system is $newest_version.)"
if ($version eq $newversion and $cluster eq $newcluster);
error 'specified cluster does not exist' unless cluster_exists $version, $cluster;
%info = cluster_info ($version, $cluster);
error 'cluster is disabled' if $info{'start'} eq 'disabled';
error "cluster $version/$cluster is already on version $newversion. " .
"(The newest version installed on this system is $newest_version.)"
if ($version eq $newversion and $cluster eq $newcluster);
if (cluster_exists $newversion, $newcluster) {
error "target cluster $newversion/$newcluster already exists";
}
......
......@@ -29,7 +29,7 @@ sub check_nonexisting_cluster_error {
my $outref;
my $result = exec_as 0, $_[0], $outref;
is $result, 1, "'$_[0]' fails";
like $$outref, qr/(invalid version|does not exist|cannot upgrade)/i, "$_[0] gives error message about nonexisting cluster";
like $$outref, qr/(invalid version|does not exist)/i, "$_[0] gives error message about nonexisting cluster";
unlike $$outref, qr/invalid symbolic link/i, "$_[0] does not print 'invalid symbolic link' gibberish";
}
......
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