bc7462d86d
Bug Fixes: * Fix issue where relative links in $PGDATA could be stored in the backup with the wrong path. This issue did not affect absolute links and relative tablespace links were caught by other checks. (Reported by Cynthia Shang.) * Remove incompletely implemented online option from the check command. Offline operation runs counter to the purpose of this command, which is to check if archiving and backups are working correctly. (Reported by Jason O'Donnell.) * Fix issue where errors raised in C were not logged when called from Perl. pgBackRest properly terminated with the correct error code but lacked an error message to aid in debugging. (Reported by Douglas J Hunley.) * Fix issue when a boolean option (e.g. delta) was specified more than once. (Reported by Yogesh Sharma.) Features: * Allow any option to be set in an environment variable. This includes options that previously could only be specified on the command line, e.g. stanza, and secret options that could not be specified on the command-line, e.g. repo1-s3-key-secret. * Exclude temporary and unlogged relation (table/index) files from backup. Implemented using the same logic as the patches adding this feature to PostgreSQL, 8694cc96 and 920a5e50. Temporary relation exclusion is enabled in PostgreSQL ≥ 9.0. Unlogged relation exclusion is enabled in PostgreSQL ≥ 9.1, where the feature was introduced. (Contributed by Cynthia Shang.) * Allow arbitrary directories and/or files to be excluded from a backup. Misuse of this feature can lead to inconsistent backups so read the --exclude documentation carefully before using. (Reviewed by Cynthia Shang.) * Add log-subprocess option to allow file logging for local and remote subprocesses. * PostgreSQL 11 Beta 3 support. Improvements: * Allow zero-size files in backup manifest to reference a prior manifest regardless of timestamp delta. (Contributed by Cynthia Shang.) * Improve asynchronous archive-get/archive-push performance by directly checking status files. (Contributed by Stephen Frost.) * Improve error message when a command is missing the stanza option. (Suggested by Sarah Conway.) |
||
---|---|---|
.. | ||
code-count | ||
data | ||
docker | ||
expect | ||
lib/pgBackRestTest | ||
lint | ||
package | ||
src | ||
.gitignore | ||
container.yaml | ||
define.yaml | ||
README.md | ||
test.pl | ||
travis.pl | ||
Vagrantfile |
pgBackRest
Regression, Unit, & Integration Testing
Introduction
pgBackRest uses Docker to run tests and generate documentation. Docker's light-weight virualization provides the a good balance between proper OS emulation and performance (especially startup)
A Vagrantfile
is provided that contains the complete configuration required to run pgBackRest tests and build documentation. If Vagrant is not suitable then the Vagrantfile
still contains the configuration steps required to build a test system.
Note that this is not required for normal operation of pgBackRest.
Testing
The easiest way to start testing pgBackRest is with the included Vagrantfile
.
Build Vagrant and Logon:
cd test
vagrant up
vagrant ssh
The vagrant up
command may take some time as a number of Docker containers must also be built. The vagrant ssh
command automatically logs onto the VM.
Run All Tests:
/backrest/test/test.pl
Run Tests for a Specific OS:
/backrest/test/test.pl --vm=co6
Run Tests for a Specific OS and Module:
/backrest/test/test.pl --vm=co6 --module=backup
Run Tests for a Specific OS, Module, and Test:
/backrest/test/test.pl --vm=co6 --module=backup --test=full
Run Tests for a Specific OS, Module, Test, and Run:
/backrest/test/test.pl --vm=co6 --module=backup --test=full --run=1
Run Tests for a Specific OS, Module, Test, and Process Max:
/backrest/test/test.pl --vm=co6 --module=backup --test=full --process-max=4
Note that process-max is only applicable to the synthetic
and full
tests in the backup
module.
Run Tests for a Specific OS, Module, Test, Process Max, and Database Version:
/backrest/test/test.pl --vm=co6 --module=backup --test=full --process-max=4 --pg-version=9.4
Note that pg-version is only applicable to the full
test in the backup
module.
Iterate All Possible Test Combinations:
/backrest/test/test.pl --dry-run