mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
* Fix broken WAL directory symlinks after WAL-E restore. * Add unit-tests for wale_restore. * Reduce the amount of MagicMock to the one (for psycopg2.connect) * Make WAL-E restore process more robuts. Allow retries only on WAL-E failures. Sleep after each attempt * Update the tests. * Change WAL-E behavior when master is absent, tests. - Challenge the use of WAL-E even when 'no_master' flag is set. This flag in fact does not indicate that the master is absent. In order to check the master absense the script looks whether the connection string is not empty. - Retry on a failure to fetch current xlog position from the master. The reason it has to be separate from retries in the main loop is that we don't just retry the connection attempt, but also make a decision when either it was successfull or all attempts are exhausted. - Remove wrong usages of ProperyMocks from the tests. * Avoid redundant output of the exception message in logger.exception * Address issues uncovered by flake8