postgresql/src/test/modules
Tom Lane 8a19c1a373 Make PostgresNode::append_conf append a newline automatically.
Although the documentation for append_conf said clearly that it didn't
add a newline, many test authors seem to have forgotten that ... or maybe
they just consulted the example at the top of the POD documentation,
which clearly shows adding a config entry without bothering to add a
trailing newline.  The worst part of that is that it works, as long as
you don't do it more than once, since the backend isn't picky about
whether config files end with newlines.  So there's not a strong forcing
function reminding test authors not to do it like that.  Upshot is that
this is a terribly fragile way to go about things, and there's at least
one existing test case that is demonstrably broken and not testing what
it thinks it is.

Let's just make append_conf append a newline, instead; that is clearly
way safer than the old definition.

I also cleaned up a few call sites that were unnecessarily ugly.
(I left things alone in places where it's plausible that additional
config lines would need to be added someday.)

Back-patch the change in append_conf itself to 9.6 where it was added,
as having a definitional inconsistency between branches would obviously
be pretty hazardous for back-patching TAP tests.  The other changes are
just cosmetic and don't need to be back-patched.

Discussion: https://postgr.es/m/19751.1492892376@sss.pgh.pa.us
2017-04-22 16:58:15 -04:00
..
brin Fix phony .PHONY. 2016-03-19 17:19:37 -04:00
commit_ts Make PostgresNode::append_conf append a newline automatically. 2017-04-22 16:58:15 -04:00
dummy_seclabel Add cleanup to new test cases 2017-03-25 11:11:43 -04:00
snapshot_too_old Add a regression test for snapshot too old with hash indexes. 2017-03-15 10:53:07 -04:00
test_ddl_deparse Remove deprecated COMMENT ON RULE syntax 2017-02-23 08:19:52 -05:00
test_extensions Fix broken wait-for-previous-process-to-exit loop in regression test. 2016-12-02 17:23:54 -05:00
test_parser Remove contrib/tsearch2. 2017-02-13 11:06:11 -05:00
test_pg_dump Run most pg_dump and pg_dumpall tests with --no-sync 2017-04-10 19:53:47 -04:00
test_rls_hooks Improve RLS planning by marking individual quals with security levels. 2017-01-18 12:58:20 -05:00
test_shm_mq Ensure BackgroundWorker struct contents are well-defined. 2017-04-16 23:23:44 -04:00
worker_spi Ensure BackgroundWorker struct contents are well-defined. 2017-04-16 23:23:44 -04:00
Makefile Provide and use a makefile target to build all generated headers. 2016-07-01 15:09:02 -04:00
README Add README in src/test and src/test/modules 2016-02-25 21:08:32 -03:00

Test extensions and libraries
=============================

src/test/modules contains PostgreSQL extensions that are primarily or entirely
intended for testing PostgreSQL and/or to serve as example code. The extensions
here aren't intended to be installed in a production server and aren't suitable
for "real work".

Most extensions have their own pg_regress tests or isolationtester specs. Some
are also used by tests elsewhere in the tree.

If you're adding new hooks or other functionality exposed as C-level API this
is where to add the tests for it.