TUN-4042: Capture cloudflared output to debug component tests

This commit is contained in:
cthuang 2021-03-23 13:21:37 +00:00
parent 4a7763e497
commit 92b3e8311f
1 changed files with 3 additions and 0 deletions

View File

@ -49,6 +49,9 @@ def run_cloudflared_background(cmd, allow_input, capture_output):
yield cfd yield cfd
finally: finally:
cfd.terminate() cfd.terminate()
if capture_output:
LOGGER.info(
f"cloudflared log: {cfd.stderr.read()}")
@retry(stop_max_attempt_number=MAX_RETRIES, wait_fixed=BACKOFF_SECS * 1000) @retry(stop_max_attempt_number=MAX_RETRIES, wait_fixed=BACKOFF_SECS * 1000)