patroni/debian/patches/behave_failure_logging.patch
Michael Banck fbfd686a2b * debian/patches/acceptance_tests_coverage_binary.patch: Updated according to
upstream feedback.
  * debian/patches/behave_failure_logging.patch: Likewise.
  * debian/patches/acceptance_tests_postgres_port.patch: Refreshed.
  * debian/patches/acceptance_tests_system_patroni.patch: Likewise.
2019-02-08 15:45:23 +01:00

20 lines
929 B
Diff

Index: patroni/features/environment.py
===================================================================
--- patroni.orig/features/environment.py
+++ patroni/features/environment.py
@@ -611,6 +611,8 @@ class PatroniPoolController(object):
feature_dir = os.path.join(self.patroni_path, 'features/output', feature_name.replace(' ', '_'))
if os.path.exists(feature_dir):
shutil.rmtree(feature_dir)
+ if os.path.exists(feature_dir + '_failed'):
+ shutil.rmtree(feature_dir + '_failed')
os.makedirs(feature_dir)
self._output_dir = feature_dir
@@ -823,3 +823,5 @@ def after_feature(context, feature):
context.pctl.stop_all()
shutil.rmtree(os.path.join(context.pctl.patroni_path, 'data'))
context.dcs_ctl.cleanup_service_tree()
+ if feature.status == 'failed':
+ shutil.copytree(context.pctl.output_dir, context.pctl.output_dir + '_failed')