postgres.git / summary / log / commit / refs
commit 99f6f19799edbba5e0a73702c0a1bd13bdd285a2
Author: Michael Paquier <michael@paquier.xyz>
Date: Thu Jun 02 00:21:32 2022 +0000
First released in: 15.0
Add missing test names in TAP tests of pg_upgrade
While on it, this removes the inclusion of getcwd() as The test code
does not rely on it.
Author: Peter Eisentraut
Discussion: https://postgr.es/m/f80ace33-11fb-1cd3-20f8-98f51d151088@enterprisedb.com
src/bin/pg_upgrade/t/002_pg_upgrade.pl | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
index 75ac768a96e..80437e93b71 100644
--- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl
+++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Cwd qw(abs_path getcwd);
+use Cwd qw(abs_path);
use File::Basename qw(dirname);
use File::Compare;
@@ -23,7 +23,9 @@ sub generate_db
}
$dbname .= $suffix;
- $node->command_ok([ 'createdb', $dbname ]);
+ $node->command_ok(
+ [ 'createdb', $dbname ],
+ "created database with ASCII characters from $from_char to $to_char");
}
# The test of pg_upgrade requires two clusters, an old one and a new one
@@ -71,7 +73,8 @@ if (defined($ENV{olddump}))
# Load the dump using the "postgres" database as "regression" does
# not exist yet, and we are done here.
- $oldnode->command_ok([ 'psql', '-X', '-f', $olddumpfile, 'postgres' ]);
+ $oldnode->command_ok([ 'psql', '-X', '-f', $olddumpfile, 'postgres' ],
+ 'loaded old dump file');
}
else
{
@@ -136,7 +139,8 @@ if (defined($ENV{oldinstall}))
'psql', '-X',
'-f', "$srcdir/src/bin/pg_upgrade/upgrade_adapt.sql",
'regression'
- ]);
+ ],
+ 'ran adapt script');
}
# Initialize a new node for the upgrade.
@@ -233,7 +237,8 @@ $newnode->command_ok(
'pg_dumpall', '--no-sync',
'-d', $newnode->connstr('postgres'),
'-f', "$tempdir/dump2.sql"
- ]);
+ ],
+ 'dump before running pg_upgrade');
# Compare the two dumps, there should be no differences.
my $compare_res = compare("$tempdir/dump1.sql", "$tempdir/dump2.sql");
[parent: dd1c8dd1015f]