Merge pull request #145 from devchat-ai/update_test_api3

refactor: Remove redundant task query in test API upload command
This commit is contained in:
boob.yang 2025-03-21 13:29:19 +00:00 committed by GitHub
commit c3de57a2b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -230,14 +230,6 @@ def main():
api_path_id = get_path_op_id(api_path, method)
with Step("开始查询测试脚本执行结果..."):
while True:
res = session.get(
f"{SERVER_URL}/autotest/projects/{PROJECT_ID}/tasks",
params={"page": 1, "size": 1},
)
ret = res.json()
task = ret["tasks"][0]
task_id = task["id"]
wait_for_task_done(task_id)
testcase = get_testcase(api_path_id)
last_testcode_passed = testcase["last_testcode_passed"]
if last_testcode_passed: