Lines Matching +full:download +full:- +full:url
1 diff --git a/framework/replay/download_utils.py b/framework/replay/download_utils.py
3 --- a/framework/replay/download_utils.py
5 @@ -31,6 +31,7 @@ import xml.etree.ElementTree as ET
13 @@ -88,7 +89,7 @@ def get_minio_credentials(url):
17 -def get_authorization_headers(url, resource):
18 +def get_minio_authorization_headers(url, resource):
19 minio_key, minio_secret, minio_token = get_minio_credentials(url)
21 content_type = 'application/octet-stream'
22 @@ -106,6 +107,17 @@ def get_authorization_headers(url, resource):
26 +def get_jwt_authorization_headers(url, resource):
28 + jwt = OPTIONS.download['jwt']
29 + host = urlparse(url).netloc
37 def download(url: str, file_path: str, headers, attempts=2) -> None:
38 """Downloads a URL content into a file
40 @@ -174,7 +186,9 @@ def ensure_file(file_path):
41 assert OPTIONS.download['minio_bucket']
42 assert OPTIONS.download['role_session_name']
43 assert OPTIONS.download['jwt']
44 - headers = get_authorization_headers(url, file_path)
45 + headers = get_minio_authorization_headers(url, file_path)
46 + elif OPTIONS.download['jwt']:
47 + headers = get_jwt_authorization_headers(url, file_path)
51 diff --git a/unittests/framework/replay/test_download_utils.py b/unittests/framework/replay/test_do…
53 --- a/unittests/framework/replay/test_download_utils.py
55 @@ -195,3 +195,17 @@ class TestDownloadUtils(object):
63 + OPTIONS.download['minio_host'] = ''
64 + OPTIONS.download['jwt'] = 'jwt'