pgsql: Fix regression tests to use only global names beginning with"re

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix regression tests to use only global names beginning with"re
Дата
Msg-id E1hhFMg-0006BF-JS@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix regression tests to use only global names beginning with "regress_".

In commit 18555b132 we tentatively established a rule that regression
tests should use names containing "regression" for databases, and names
starting with "regress_" for all other globally-visible object names, so
as to circumscribe the side-effects that "make installcheck" could have on
an existing installation.  However, no enforcement mechanism was created,
so it's unsurprising that some new violations have crept in since then.

In fact, a whole new *category* of violations has crept in, to wit we now
also have globally-visible subscription and replication origin names, and
"make installcheck" could very easily clobber user-created objects of
those types.  So it's past time to do something about this.

This commit sanitizes the tests enough that they will pass (i.e. not
generate any visible warnings) with the enforcement mechanism I'll add
in the next commit.  There are some TAP tests that still trigger the
warnings, but the warnings do not cause test failure.  Since these tests
do not actually run against a pre-existing installation, there's no need
to worry whether they could conflict with user-created objects.

The problem with rolenames.sql testing special role names like "user"
is still there, and is dealt with only very cosmetically in this patch
(by hiding the warnings :-().  What we actually need to do to be safe is
to take that test script out of "make installcheck" altogether, but that
seems like material for a separate patch.

Discussion: https://postgr.es/m/16638.1468620817@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ca129e58c01f29ef24a734313ff315933b3d5b67

Modified Files
--------------
contrib/test_decoding/expected/replorigin.out |  42 ++++----
contrib/test_decoding/expected/rewrite.out    |   6 +-
contrib/test_decoding/sql/replorigin.sql      |  26 ++---
contrib/test_decoding/sql/rewrite.sql         |   6 +-
src/bin/pg_dump/t/010_dump_connstr.pl         | 117 +++++++++++++--------
src/bin/pg_upgrade/test.sh                    |   6 +-
src/test/regress/expected/object_address.out  |   8 +-
src/test/regress/expected/rolenames.out       |   8 ++
src/test/regress/expected/subscription.out    | 142 +++++++++++++-------------
src/test/regress/sql/object_address.sql       |   6 +-
src/test/regress/sql/rolenames.sql            |  10 ++
src/test/regress/sql/subscription.sql         |  82 +++++++--------
12 files changed, 254 insertions(+), 205 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Remove unnecessary header from be-secure-gssapi.c
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Don't call data type input functions in GUC check hooks