Added -k parameter to curl to ignore self signed SSL certificate #50

Merged
ylukoyan merged 1 commit from ylukoyan/frostfs-testlib:curl into master 2023-07-07 06:40:49 +00:00
Showing only changes of commit 05cc28c119 - Show all commits

View file

@ -215,13 +215,13 @@ def upload_via_http_gate_curl(
# pre-clean
_cmd_run("rm pipe -f")
files = f"file=@pipe;filename={os.path.basename(filepath)}"
cmd = f"mkfifo pipe;cat {filepath} > pipe & curl --no-buffer -F '{files}' {attributes} {request}"
cmd = f"mkfifo pipe;cat {filepath} > pipe & curl -k --no-buffer -F '{files}' {attributes} {request}"
output = _cmd_run(cmd, LONG_TIMEOUT)
# clean up pipe
_cmd_run("rm pipe")
else:
files = f"file=@{filepath};filename={os.path.basename(filepath)}"
cmd = f"curl -F '{files}' {attributes} {request}"
cmd = f"curl -k -F '{files}' {attributes} {request}"
output = _cmd_run(cmd)
if error_pattern:
@ -246,7 +246,7 @@ def get_via_http_curl(cid: str, oid: str, endpoint: str) -> str:
request = f"{endpoint}/get/{cid}/{oid}"
file_path = os.path.join(os.getcwd(), ASSETS_DIR, f"{cid}_{oid}_{str(uuid.uuid4())}")
cmd = f"curl {request} > {file_path}"
cmd = f"curl -k {request} > {file_path}"
_cmd_run(cmd)
return file_path