From 3d7ccd684bbad5f242dbe70d889c35d4de7ee09b Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Wed, 21 Sep 2022 18:40:22 +0800 Subject: [PATCH] Sqlauto (#4667) * feat: upload testcases to SQLAuto server * fix: optimize for uploading testcases to SQLAuto server --- tests/common/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/common/utils.py b/tests/common/utils.py index 9c16aa45721..e9c8a1e21bc 100644 --- a/tests/common/utils.py +++ b/tests/common/utils.py @@ -509,7 +509,7 @@ def upload_2_sqlauto(ngql, resp, space_name=None): "testAccountId": None, "name": ngql if len(ngql) <= 20 else (ngql[:16] + "..."), "type": "JSON", - "url": "/" + space_name, + "url": "/" + ("" if space_name is None else space_name), "request": "{}", "sqlauto": ngql, "standard": None, @@ -519,8 +519,8 @@ def upload_2_sqlauto(ngql, resp, space_name=None): "randomId": 0, "host": "jdbc:nebula://localhost:9669", "testAccountId": None, - "response": ('{"code":200,msg:"success","list":' + json.dumps(resp.rows) + '}') - if resp.is_succeeded else ('{"code":' + resp.error_code + ',msg:' + resp.error_msg + '}'), + "response": ('{"code":200,"msg":"success","list":' + json.dumps(resp.rows) + '}') + if resp.is_succeeded else ('{"code":' + resp.error_code + ',"msg":' + resp.error_msg + '}'), "standard": None }, "tag": "Document" if is_doc else "TestRecord"