summaryrefslogtreecommitdiff
path: root/src/test/perl/PostgreSQL/Test/Cluster.pm
diff options
context:
space:
mode:
authorNathan Bossart <nathan@postgresql.org>2025-03-20 11:08:42 -0500
committerNathan Bossart <nathan@postgresql.org>2025-03-20 11:08:42 -0500
commitaf0d4901c1c39b3e3425522834708e0992592bb8 (patch)
treea5cdc537d8ca7eb3fd9eaddea8c2456638d19da6 /src/test/perl/PostgreSQL/Test/Cluster.pm
parent0164a0f9ee12e0eff9e4c661358a272ecd65c2d4 (diff)
Add test for pg_upgrade file transfer modes.
This new test checks all of pg_upgrade's file transfer modes. For each mode, we verify that pg_upgrade either succeeds (and some test objects successfully reach the new version) or fails with an error that indicates the mode is not supported on the current platform. For cross-version tests, we also check that pg_upgrade transfers non-default tablespaces. (Tablespaces can't be tested on same version upgrades because of the version-specific subdirectory conflict, but we might be able to enable such tests once we teach pg_upgrade how to handle in-place tablespaces.) Suggested-by: Robert Haas <robertmhaas@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/Zyvop-LxLXBLrZil%40nathan
Diffstat (limited to 'src/test/perl/PostgreSQL/Test/Cluster.pm')
-rw-r--r--src/test/perl/PostgreSQL/Test/Cluster.pm19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index 05bd94609d4..8759ed2cbba 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -2801,6 +2801,25 @@ sub command_fails_like
=pod
+=item $node->command_ok_or_fails_like(...)
+
+PostgreSQL::Test::Utils::command_ok_or_fails_like with our connection parameters. See command_ok(...)
+
+=cut
+
+sub command_ok_or_fails_like
+{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+
+ my $self = shift;
+
+ local %ENV = $self->_get_env();
+
+ return PostgreSQL::Test::Utils::command_ok_or_fails_like(@_);
+}
+
+=pod
+
=item $node->command_checks_all(...)
PostgreSQL::Test::Utils::command_checks_all with our connection parameters. See