Fix several issues with the TAP tests of pg_upgrade
authorMichael Paquier <michael@paquier.xyz>
Tue, 10 May 2022 02:31:31 +0000 (11:31 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 10 May 2022 02:31:31 +0000 (11:31 +0900)
commit7dd3ee508432730d15c5d3032f37362f6b6e4dd8
tree572df25ea8630d886a0f730401624009d558f51c
parentfe20afaee8aac7838ed6e4a76baa83e547629582
Fix several issues with the TAP tests of pg_upgrade

This commit addresses the following issues in the TAP tests of
pg_upgrade, introduced in 322becb:
- Remove --port and --host for commands that already rely on a node's
environment PGHOST and PGPORT.
- Switch from run_log() to command_ok(), as all the commands executed in
the tests should succeed.
- Change EXTRA_REGRESS_OPTS to make it count as a shell fragment (fixing
s/OPT/OPTS on a way), to be compatible with the various Makefiles using
it as well as 027_stream_regress.pl in the recovery tests.  The command
built for the execution the pg_regress command is reformatted, while on
it, to map with the recovery test doing the same thing (we should
refactor and consolidate that in the future, perhaps).
- Re-add the test for database names stressing the behavior of
backslashes with double quotes, mostly here for Windows.

Tests doable with the upgrade across different major versions still work
the same way.

Reported-by: Noah Misch
Discussion: https://postgr.es/m/20220502042718.GB1565149@rfd.leadboat.com
src/bin/pg_upgrade/t/002_pg_upgrade.pl