Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issues identified while writing unit tests for Flask endpoints
This commit fixes a couple issues that were identified while writing unit tests for the REST API endpoints: * `load_barman_config` was being called upon module import of `pg_backup_api.server_operation`. As the result of that function is only used when instantiating the `OperationServer` class, it makes more sense to call it from its `__init__` method. Unit tests were adjusted accordingly * POST request to `/servers/*server_name*/operations` was returning a bogus message if no Barman backup corresponding to given `backup_id` could be found -- it was printing `None` instead of the given `backup_id` References: BAR-132. Signed-off-by: Israel Barth Rubio <israel.barth@enterprisedb.com>
- Loading branch information