* debian/patches/coverage_binary.patch: Removed, and replaced with ...
* debian/patches/acceptance_tests_coverage_binary.patch: ... this patch, which is generally applicable.
This commit is contained in:
parent
14b1f81df2
commit
8a65afb554
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -4,6 +4,9 @@ patroni (1.5.4-7) UNRELEASED; urgency=medium
|
|||
* debian/pg_creatconfig_patroni: Remove --scope option in favor of
|
||||
pg_createcluster's regular "[options] <version> <cluster name>" syntax.
|
||||
* debian/patches/sphinx_no_mathjax.patch: Removed, no longer needed.
|
||||
* debian/patches/coverage_binary.patch: Removed, and replaced with ...
|
||||
* debian/patches/acceptance_tests_coverage_binary.patch: ... this patch,
|
||||
which is generally applicable.
|
||||
|
||||
-- Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org> Mon, 04 Feb 2019 21:12:35 +0100
|
||||
|
||||
|
|
60
debian/patches/acceptance_tests_coverage_binary.patch
vendored
Normal file
60
debian/patches/acceptance_tests_coverage_binary.patch
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
--- ./features/environment.py.orig 2019-02-07 15:25:33.462976044 +0100
|
||||
+++ ./features/environment.py 2019-02-07 15:26:56.663869767 +0100
|
||||
@@ -1,5 +1,6 @@
|
||||
import abc
|
||||
import datetime
|
||||
+import distutils.spawn
|
||||
import etcd
|
||||
import kazoo.client
|
||||
import kazoo.exceptions
|
||||
@@ -141,7 +142,12 @@
|
||||
if isinstance(self._context.dcs_ctl, KubernetesController):
|
||||
self._context.dcs_ctl.create_pod(self._name[8:], self._scope)
|
||||
os.environ['PATRONI_KUBERNETES_POD_IP'] = '10.0.0.' + self._name[-1]
|
||||
- return subprocess.Popen(['coverage', 'run', '--source=patroni', '-p', 'patroni.py', self._config],
|
||||
+
|
||||
+ COVERAGE_BIN = distutils.spawn.find_executable('coverage')
|
||||
+ if not COVERAGE_BIN:
|
||||
+ COVERAGE_BIN = distutils.spawn.find_executable('python3-coverage')
|
||||
+
|
||||
+ return subprocess.Popen([COVERAGE_BIN, 'run', '--source=patroni', '-p', 'patroni.py', self._config],
|
||||
stdout=self._log, stderr=subprocess.STDOUT, cwd=self._work_directory)
|
||||
|
||||
def stop(self, kill=False, timeout=15, postgres=False):
|
||||
@@ -809,8 +815,13 @@
|
||||
|
||||
def after_all(context):
|
||||
context.dcs_ctl.stop()
|
||||
- subprocess.call(['coverage', 'combine'])
|
||||
- subprocess.call(['coverage', 'report'])
|
||||
+
|
||||
+ COVERAGE_BIN = distutils.spawn.find_executable('coverage')
|
||||
+ if not COVERAGE_BIN:
|
||||
+ COVERAGE_BIN = distutils.spawn.find_executable('python3-coverage')
|
||||
+
|
||||
+ subprocess.call([COVERAGE_BIN, 'combine'])
|
||||
+ subprocess.call([COVERAGE_BIN, 'report'])
|
||||
|
||||
|
||||
def before_feature(context, feature):
|
||||
--- ./features/steps/patroni_api.py.orig 2019-02-07 15:25:36.855012350 +0100
|
||||
+++ ./features/steps/patroni_api.py 2019-02-07 15:27:30.840238671 +0100
|
||||
@@ -1,4 +1,5 @@
|
||||
import base64
|
||||
+import distutils.spawn
|
||||
import json
|
||||
import os
|
||||
import parse
|
||||
@@ -95,7 +96,11 @@
|
||||
|
||||
@step('I run {cmd}')
|
||||
def do_run(context, cmd):
|
||||
- cmd = ['coverage', 'run', '--source=patroni', '-p'] + shlex.split(cmd)
|
||||
+ COVERAGE_BIN = distutils.spawn.find_executable('coverage')
|
||||
+ if not COVERAGE_BIN:
|
||||
+ COVERAGE_BIN = distutils.spawn.find_executable('python3-coverage')
|
||||
+
|
||||
+ cmd = [COVERAGE_BIN, 'run', '--source=patroni', '-p'] + shlex.split(cmd)
|
||||
try:
|
||||
# XXX: Dirty hack! We need to take name/passwd from the config!
|
||||
env = os.environ.copy()
|
37
debian/patches/coverage_binary.patch
vendored
37
debian/patches/coverage_binary.patch
vendored
|
@ -1,37 +0,0 @@
|
|||
Index: patroni/features/environment.py
|
||||
===================================================================
|
||||
--- patroni.orig/features/environment.py
|
||||
+++ patroni/features/environment.py
|
||||
@@ -142,7 +142,7 @@ class PatroniController(AbstractControll
|
||||
if isinstance(self._context.dcs_ctl, KubernetesController):
|
||||
self._context.dcs_ctl.create_pod(self._name[8:], self._scope)
|
||||
os.environ['PATRONI_KUBERNETES_POD_IP'] = '10.0.0.' + self._name[-1]
|
||||
- return subprocess.Popen(['coverage', 'run', '--source=patroni', '-p', 'patroni.py', self._config],
|
||||
+ return subprocess.Popen(['python3-coverage', 'run', '--source=patroni', '-p', 'patroni.py', self._config],
|
||||
stdout=self._log, stderr=subprocess.STDOUT, cwd=self._work_directory)
|
||||
|
||||
def stop(self, kill=False, timeout=15, postgres=False):
|
||||
@@ -809,8 +809,8 @@ def before_all(context):
|
||||
|
||||
def after_all(context):
|
||||
context.dcs_ctl.stop()
|
||||
- subprocess.call(['coverage', 'combine'])
|
||||
- subprocess.call(['coverage', 'report'])
|
||||
+ subprocess.call(['python3-coverage', 'combine'])
|
||||
+ subprocess.call(['python3-coverage', 'report'])
|
||||
|
||||
|
||||
def before_feature(context, feature):
|
||||
Index: patroni/features/steps/patroni_api.py
|
||||
===================================================================
|
||||
--- patroni.orig/features/steps/patroni_api.py
|
||||
+++ patroni/features/steps/patroni_api.py
|
||||
@@ -95,7 +95,7 @@ def do_request(context, request_method,
|
||||
|
||||
@step('I run {cmd}')
|
||||
def do_run(context, cmd):
|
||||
- cmd = ['coverage', 'run', '--source=patroni', '-p'] + shlex.split(cmd)
|
||||
+ cmd = ['python3-coverage', 'run', '--source=patroni', '-p'] + shlex.split(cmd)
|
||||
try:
|
||||
# XXX: Dirty hack! We need to take name/passwd from the config!
|
||||
env = os.environ.copy()
|
2
debian/patches/series
vendored
2
debian/patches/series
vendored
|
@ -1,8 +1,8 @@
|
|||
startup_scripts.patch
|
||||
coverage_binary.patch
|
||||
consul_import.patch
|
||||
behave_failure_logging.patch
|
||||
check_postmaster.patch
|
||||
acceptance_tests_coverage_binary.patch
|
||||
acceptance_tests_system_patroni.patch
|
||||
automatic_primary_reinit.patch
|
||||
patronictl_timeline_info.patch
|
||||
|
|
Loading…
Reference in a new issue