feat,fix(): 优化
- 优化 settings(使用环境变量) - 修复bug
This commit is contained in:
@@ -10,19 +10,23 @@
|
|||||||
@desc:
|
@desc:
|
||||||
"""
|
"""
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import os
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
load_dotenv()
|
||||||
|
|
||||||
root_path = (Path(__file__)).resolve().parents[1]
|
root_path = (Path(__file__)).resolve().parents[1]
|
||||||
|
|
||||||
base_url = 'http://119.91.19.171:40065'
|
base_url = os.getenv("BASE_URL")
|
||||||
cases_dir = rf"{root_path}\TestCases\answer"
|
cases_dir = rf"{root_path}\TestCases\answer"
|
||||||
exchanger = rf"{root_path}\extract.yaml"
|
exchanger = rf"{root_path}\extract.yaml"
|
||||||
id_path = rf"{root_path}\id.yaml"
|
id_path = rf"{root_path}\id.yaml"
|
||||||
|
|
||||||
db_host = '119.91.19.171' # ip
|
db_host = os.getenv("DB_HOST") # ip
|
||||||
db_port = 3306 # 端口
|
db_port = os.getenv("DB_PORT") # 端口
|
||||||
db_user = 'root' # 用户名
|
db_user = os.getenv("DB_USER") # 用户名
|
||||||
db_password = 'mysql_hNahSe' # 密码
|
db_password = os.getenv("DB_PASSWORD") # 密码
|
||||||
db_database = 'answer' # 库名
|
db_database = os.getenv("DB_DATABASE")
|
||||||
|
|
||||||
allure_epic: str = "项目名称:answer"
|
allure_epic: str = "项目名称:answer"
|
||||||
allure_feature: str = "默认特征(feature)"
|
allure_feature: str = "默认特征(feature)"
|
||||||
@@ -31,6 +35,6 @@ allure_story: str = "默认事件(story)"
|
|||||||
rsa_public = ""
|
rsa_public = ""
|
||||||
rsa_private = ""
|
rsa_private = ""
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print(root_path)
|
print(root_path)
|
||||||
|
print(base_url,db_host,db_port,db_user,db_password,db_database)
|
||||||
|
|||||||
Reference in New Issue
Block a user