mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
Modify testrail to use global variable for TR URL and project ID
This commit is contained in:
@@ -16,6 +16,7 @@ from pprint import pprint
|
||||
import os
|
||||
tr_user=os.getenv('TR_USER')
|
||||
tr_pw=os.getenv('TR_PWD')
|
||||
project = os.getenv('PROJECT_ID')
|
||||
|
||||
|
||||
class APIClient:
|
||||
@@ -125,7 +126,7 @@ class APIClient:
|
||||
def get_run_id(self, test_run_name):
|
||||
"Get the run ID using test name and project name"
|
||||
run_id = None
|
||||
project_id = client.get_project_id(project_name=project_id)
|
||||
project_id = client.get_project_id(project_name=project)
|
||||
|
||||
try:
|
||||
test_runs = client.send_get('get_runs/%s' % (project_id))
|
||||
@@ -180,7 +181,7 @@ class APIClient:
|
||||
print("result in post", result)
|
||||
|
||||
client: APIClient = APIClient(os.getenv('TESTRAIL_URL'))
|
||||
project_id = os.getenv('PROJECT_ID')
|
||||
|
||||
|
||||
class APIError(Exception):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user