postgresql/src/test/recovery
Alvaro Herrera 2c83f435a3 Rework PostgresNode's psql method
This makes the psql() method much more capable: it captures both stdout
and stderr; it now returns the psql exit code rather than stdout; a
timeout can now be specified, as can ON_ERROR_STOP behavior; it gained a
new "on_error_die" (defaulting to off) parameter to raise an exception
if there's any problem.  Finally, additional parameters to psql can be
passed if there's need for further tweaking.

For convenience, a new safe_psql() method retains much of the old
behavior of psql(), except that it uses on_error_die on, so that
problems like syntax errors in SQL commands can be detected more easily.

Many existing TAP test files now use safe_psql, which is what is really
wanted.  A couple of ->psql() calls are now added in the commit_ts
tests, which verify that the right thing is happening on certain errors.
Some ->command_fails() calls in recovery tests that were verifying that
psql failed also became ->psql() calls now.

Author: Craig Ringer. Some tweaks by Álvaro Herrera
Reviewed-By: Michaël Paquier
2016-03-03 17:58:30 -03:00
..
t Rework PostgresNode's psql method 2016-03-03 17:58:30 -03:00
.gitignore Minor tweaks for new src/test/recovery 2016-02-29 18:16:59 -03:00
Makefile Minor tweaks for new src/test/recovery 2016-02-29 18:16:59 -03:00
README Minor tweaks for new src/test/recovery 2016-02-29 18:16:59 -03:00

README

src/test/recovery/README

Regression tests for recovery and replication
=============================================

This directory contains a test suite for recovery and replication.

Running the tests
=================

    make check

NOTE: This creates a temporary installation, and some tests may
create one or multiple nodes, be they master or standby(s) for the
purpose of the tests.

NOTE: This requires the --enable-tap-tests argument to configure.