1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-07 19:40:30 +08:00

TUN-9916: Fix the cloudflared binary path used in the component test

This commit is contained in:
chungthuang
2025-10-14 11:04:00 -05:00
committed by Chung-Ting Huang
parent d943602d21
commit 12c2a8e144
3 changed files with 9 additions and 3 deletions

View File

@@ -107,7 +107,13 @@ class TestManagement:
assert resp.status_code == 404, "Expected cloudflared to return 404 for /metrics"
@retry(stop_max_attempt_number=MAX_RETRIES, wait_fixed=BACKOFF_SECS * 1000)
def send_request(url, headers={}):
with requests.Session() as s:
return s.get(url, timeout=BACKOFF_SECS, headers=headers)
resp = s.get(url, timeout=BACKOFF_SECS, headers=headers)
if resp.status_code == 530:
LOGGER.debug(f"Received 530 status, retrying request to {url}")
raise Exception(f"Received 530 status code from {url}")
return resp