git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: a1e61ba) | patch
Fix regression tests to use only global names beginning with "regress_".
2019年6月29日 15:09:03 +0000 (11:09 -0400)
2019年6月29日 15:09:03 +0000 (11:09 -0400)
commit ca129e58c01f29ef24a734313ff315933b3d5b67
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
12 files changed:
contrib/test_decoding/expected/replorigin.out diff | blob | blame | history
contrib/test_decoding/expected/rewrite.out diff | blob | blame | history
contrib/test_decoding/sql/replorigin.sql diff | blob | blame | history
contrib/test_decoding/sql/rewrite.sql diff | blob | blame | history
src/bin/pg_dump/t/010_dump_connstr.pl diff | blob | blame | history
src/bin/pg_upgrade/test.sh diff | blob | blame | history
src/test/regress/expected/object_address.out diff | blob | blame | history
src/test/regress/expected/rolenames.out diff | blob | blame | history
src/test/regress/expected/subscription.out diff | blob | blame | history
src/test/regress/sql/object_address.sql diff | blob | blame | history
src/test/regress/sql/rolenames.sql diff | blob | blame | history
src/test/regress/sql/subscription.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /