e2e: catch testrail error

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2021-11-19 18:27:21 +01:00
parent debf3df61c
commit 27f1feeaf6
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
2 changed files with 6 additions and 3 deletions

View File

@ -8,9 +8,9 @@ chardet==3.0.4
cycler==0.10.0
cytoolz==0.11.0
emoji==0.5.0
eth-hash==0.2.0
eth-hash==0.3.2
eth-keys==0.3.3
eth-utils==1.9.5
eth-utils==1.10.0
ethereum==2.3.2
execnet==1.7.1
future==0.18.2

View File

@ -130,7 +130,10 @@ class TestrailReport(BaseTestReport):
'comment': '%s' % ('# Error: \n %s \n' % emoji.demojize(
last_testrun.error)) + devices + test_steps if last_testrun.error
else devices + test_steps}
result_id = self.post(method, data=data)['id']
try:
result_id = self.post(method, data=data)['id']
except KeyError:
result_id = ''
if last_testrun.error:
for geth in test.geth_paths.keys():
self.add_attachment(method='add_attachment_to_result/%s' % str(result_id),