diff --git a/tests/pytest/functions/variable_httpDbNameMandatory.py b/tests/pytest/functions/variable_httpDbNameMandatory.py index 3be620ad1e1631126697d93e388df82be3e9d57c..1cd2516ec9303f2f038bc22a69afcd01bce3a930 100644 --- a/tests/pytest/functions/variable_httpDbNameMandatory.py +++ b/tests/pytest/functions/variable_httpDbNameMandatory.py @@ -34,11 +34,15 @@ class TDTestCase: def getBuildPath(self) -> str: selfPath = os.path.dirname(os.path.realpath(__file__)) + global cfgPath if ("community" in selfPath): projPath = selfPath[:selfPath.find("community")] + cfgPath = projPath + "/community/sim/dnode1/cfg" else: projPath = selfPath[:selfPath.find("tests")] + cfgPath = projPath + "/sim/dnode1/cfg" + for root, dirs, files in os.walk(projPath): if ("taosd" in files): @@ -53,8 +57,10 @@ class TDTestCase: if ("community" in selfPath): cfgDir = self.getBuildPath() + "/community/sim/dnode1/cfg" + else: cfgDir = self.getBuildPath() + "/sim/dnode1/cfg" + return cfgDir def getCfgFile(self) -> str: @@ -85,8 +91,8 @@ class TDTestCase: def TS834(self): tdLog.printNoPrefix("==========TS-782==========") tdSql.prepare() - - cfgfile = self.getCfgFile() + buildPath = self.getBuildPath() + cfgfile = cfgPath + "/taos.cfg" tdSql.execute("show variables") res_com = tdSql.cursor.fetchall() diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertShell.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertShell.py index 643b485982e123c8314988b0886557a095222474..7f3106e0fa52b8622fe91546e13e4df69defed73 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertShell.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertShell.py @@ -33,6 +33,7 @@ class TDTestCase: else: projPath = selfPath[:selfPath.find("tests")] + cfgPath = projPath + "/sim/dnode1/cfg" for root, dirs, files in os.walk(projPath): if ("taosd" in files):