patroni/debian/patches/acceptance_tests_coverage_binary.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

51 lines
1.9 KiB
Diff

--- ./features/environment.py.orig 2019-02-08 10:37:57.008318346 +0100
+++ ./features/environment.py 2019-02-08 10:39:22.654197675 +0100
@@ -11,6 +11,7 @@
import signal
import six
import subprocess
+import sys
import tempfile
import threading
import time
@@ -141,7 +141,8 @@
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([sys.executable, '-m', '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 +810,8 @@
def after_all(context):
context.dcs_ctl.stop()
- subprocess.call(['coverage', 'combine'])
- subprocess.call(['coverage', 'report'])
+ subprocess.call([sys.executable, '-m', 'coverage', 'combine'])
+ subprocess.call([sys.executable, '-m', 'coverage', 'report'])
def before_feature(context, feature):
--- ./features/steps/patroni_api.py.orig 2019-02-08 10:39:27.598301865 +0100
+++ ./features/steps/patroni_api.py 2019-02-08 10:39:48.942746671 +0100
@@ -5,6 +5,7 @@
import requests
import shlex
import subprocess
+import sys
import time
import yaml
@@ -95,7 +95,7 @@
@step('I run {cmd}')
def do_run(context, cmd):
- cmd = ['coverage', 'run', '--source=patroni', '-p'] + shlex.split(cmd)
+ cmd = [sys.executable, '-m', '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()