Refactor and fix TAP tests of pg_rewind
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 13 Apr 2015 15:06:12 +0000 (18:06 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 13 Apr 2015 15:09:20 +0000 (18:09 +0300)
commit53ba10770a315361770efdc17d2c01f6a30e3e3d
treed83ec6d70e8e25f920dc22818833b59d31e9b62f
parentb2a5545bd63fc94a71b1e97ecdd03c605d97a438
Refactor and fix TAP tests of pg_rewind

* Don't pass arguments to prove, since that's not supported on perl 5.8
which is the minimum version supported by the TAP tests. Refactor the
test files themselves to run the tests twice, in both local and remote mode.

* Use eq rather than == for string comparison. This thinko caused the remote
versions of the tests to never run.

* Add "use strict" and "use warnings", and fix warnings that that produced.

* Increase the delay after standby promotion, to make the tests more robust.

* In remote mode, the connection string to the promoted standby was
incorrect, leading to connection errors.

Patch by Michael Paquier, to address Peter Eisentraut's report.
src/bin/pg_rewind/Makefile
src/bin/pg_rewind/RewindTest.pm
src/bin/pg_rewind/t/001_basic.pl
src/bin/pg_rewind/t/002_databases.pl
src/bin/pg_rewind/t/003_extrafiles.pl