EndUpload
end_upload(public_api_client, uuid)
Expand source code
end_upload(public_api_client, uuid):
"""
Description
-----------
To finish artifacts upload.
Args
----
public_api_client: QDC api client object.
uuid: uuid of the initiated start upload request.
Returns
-------
true: If the upload is finished.
false: If failed to finish the upload.
Usages
------
file_path = "C:\\Temp\\test.apk"
file_name = get_filename(file_path)
artifact_type = ArtifactType.TESTPACKAGE
uuid = start_upload(public_api_client, file_name, artifact_type)
continue_upload(public_api_client, uuid, file_path, file_name, artifact_type)
end_upload(public_api_client, uuid)
"""
artifact_upload_end_response = post_artifacts_uuid_endupload.sync_detailed(uuid=uuid, client=public_api_client)
if artifact_upload_end_response.status_code == 200:
print(f"Complete upload response: {artifact_upload_end_response.content.decode('utf-8')}")
return True
else:
print(
f"Upload artifact failed with error code {artifact_upload_end_response.status_code} {artifact_upload_end_response.content.decode('utf-8')}")
return False
Description
To finish artifacts upload.
Arguments
public_api_client: QDC api client object.
uuid: uuid of the initiated start upload request.
Returns
true: If the upload is finished.
false: If failed to finish the upload.
Usages
file_path = "C:\\Temp\\test.apk"
file_name = get_filename(file_path)
artifact_type = ArtifactType.TESTPACKAGE
uuid = start_upload(public_api_client, file_name, artifact_type)
continue_upload(public_api_client, uuid, file_path, file_name, artifact_type)
end_upload(public_api_client, uuid)