mirror of
https://github.com/status-im/status-react.git
synced 2025-02-18 13:58:24 +00:00
e2e: fix for nightly apk upload (#16517)
This commit is contained in:
parent
25b088833d
commit
362aa476ae
@ -226,7 +226,7 @@ def pytest_configure(config):
|
|||||||
resp = sauce.storage._session.request('post', '/v1/storage/upload',
|
resp = sauce.storage._session.request('post', '/v1/storage/upload',
|
||||||
files={'payload': f})
|
files={'payload': f})
|
||||||
try:
|
try:
|
||||||
if resp['item']['name'] != apk_name:
|
if resp['item']['name'] != test_suite_data.apk_name:
|
||||||
raise UploadApkException(
|
raise UploadApkException(
|
||||||
"Incorrect apk was uploaded to Sauce storage, response:\n%s" % resp)
|
"Incorrect apk was uploaded to Sauce storage, response:\n%s" % resp)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
@ -234,9 +234,8 @@ def pytest_configure(config):
|
|||||||
"Error when uploading apk to Sauce storage, response:\n%s" % resp)
|
"Error when uploading apk to Sauce storage, response:\n%s" % resp)
|
||||||
|
|
||||||
if 'http' in config.getoption('apk'):
|
if 'http' in config.getoption('apk'):
|
||||||
apk_name = config.getoption('apk').split("/")[-1]
|
|
||||||
# it works with just a file_name, but I've added full path because not sure how it'll behave on the remote run (Jenkins)
|
# it works with just a file_name, but I've added full path because not sure how it'll behave on the remote run (Jenkins)
|
||||||
file_path, to_remove = os.path.join(os.path.dirname(__file__), apk_name), True
|
file_path, to_remove = os.path.join(os.path.dirname(__file__), test_suite_data.apk_name), True
|
||||||
urllib.request.urlretrieve(config.getoption('apk'),
|
urllib.request.urlretrieve(config.getoption('apk'),
|
||||||
filename=file_path) # if url is not valid it raises an error
|
filename=file_path) # if url is not valid it raises an error
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user