Fix one hint message in 002_pg_upgrade.pl

Started by Zhijie Hou (Fujitsu)about 2 years ago2 messages
#1Zhijie Hou (Fujitsu)
houzj.fnst@fujitsu.com
1 attachment(s)

Hi,

There is one hint message in 002_pg_upgrade.pl that is not consistent with the
testing purpose.

# --check command works here, cleans up pg_upgrade_output.d.
command_ok(
	[
		'pg_upgrade', '--no-sync', '-d', $oldnode->data_dir,
...
ok(!-d $newnode->data_dir . "/pg_upgrade_output.d",
-	"pg_upgrade_output.d/ not removed after pg_upgrade --check success");
+	"pg_upgrade_output.d/ removed after pg_upgrade --check success");

The test is to confirm the output file has been removed for pg_upgrade --check while
the message here is not consistent. Attach a small patch to fix it.

Best Regards,
Hou Zhijie

Attachments:

0001-Fix-one-hint-message-in-002_pg_upgrade.pl.patchapplication/octet-stream; name=0001-Fix-one-hint-message-in-002_pg_upgrade.pl.patchDownload
From 79ad45b5e3f306c69631d978e2f0b4f3a944ed4f Mon Sep 17 00:00:00 2001
From: Hou Zhijie <houzj.fnst@fujitsu.com>
Date: Wed, 18 Oct 2023 15:19:45 +0800
Subject: [PATCH] Fix one hint message in 002_pg_upgrade.pl

---
 src/bin/pg_upgrade/t/002_pg_upgrade.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
index a5688a1cf2..c6d83d3c21 100644
--- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl
+++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
@@ -382,7 +382,7 @@ command_ok(
 	],
 	'run of pg_upgrade --check for new instance');
 ok(!-d $newnode->data_dir . "/pg_upgrade_output.d",
-	"pg_upgrade_output.d/ not removed after pg_upgrade --check success");
+	"pg_upgrade_output.d/ removed after pg_upgrade --check success");
 
 # Actual run, pg_upgrade_output.d is removed at the end.
 command_ok(
-- 
2.30.0.windows.2

#2Michael Paquier
michael@paquier.xyz
In reply to: Zhijie Hou (Fujitsu) (#1)
Re: Fix one hint message in 002_pg_upgrade.pl

On Wed, Oct 18, 2023 at 07:27:45AM +0000, Zhijie Hou (Fujitsu) wrote:

The test is to confirm the output file has been removed for pg_upgrade --check while
the message here is not consistent. Attach a small patch to fix it.

Indeed, will fix. Thanks!
--
Michael