diff --git a/tests/army/community/cmdline/fullopt.py b/tests/army/community/cmdline/fullopt.py index 8a69ae11c5..e0a0a51bfc 100644 --- a/tests/army/community/cmdline/fullopt.py +++ b/tests/army/community/cmdline/fullopt.py @@ -36,20 +36,48 @@ class TDTestCase(TBase): self.timestamp_step = 1000 # taosBenchmark run - etool.runBenchmark(command = f"-d {self.db} -t {self.childtable_count} -n {self.insert_rows} -y") + etool.runBenchmark(command = f"-d {self.db} -t {self.childtable_count} -n {self.insert_rows} -v 2 -y") - def doAction(self): - tdLog.info(f"do action.") + def doTaosd(self): + tdLog.info(f"check taosd command options...") + idx = 1 # dnode1 + cfg = sc.dnodeCfgPath(idx) - # dump out sdb + # -s sdb = "./sdb.json" eos.delFile(sdb) - - cfg = sc.dnodeCfgPath(1) etool.runBinFile("taosd", f"-s -c {cfg}") self.checkFileExist(sdb) - + + # -C + etool.runBinFile("taosd", "-C") + # -k + rets = etool.runBinFile("taosd", "-C") + self.checkListNotEmpty(rets) + # -V + rets = etool.runBinFile("taosd", "-V") + self.checkListNotEmpty(rets) + # --help + rets = etool.runBinFile("taosd", "--help") + self.checkListNotEmpty(rets) + + # except input + etool.runBinFile("taosd", "-c") + etool.runBinFile("taosd", "-e") + + # stop taosd + sc.dnodeStop(idx) + # other + etool.runBinFile("taosd", f"-dm -c {cfg}") + sc.dnodeStop(idx) + etool.runBinFile("taosd", "-a http://192.168.1.10") + etool.runBinFile("taosd", f"-E abc -c {cfg}") + etool.runBinFile("taosd", f"-e abc -c {cfg}") + + def doTaos(self): + tdLog.info(f"check taos command options...") + # run def run(self): @@ -59,7 +87,10 @@ class TDTestCase(TBase): self.insertData() # do action - self.doAction() + self.doTaosd() + + # do taos + self.doTaos() tdLog.success(f"{__file__} successfully executed") diff --git a/tests/army/frame/caseBase.py b/tests/army/frame/caseBase.py index 535b7aeeb4..c9f3aa1880 100644 --- a/tests/army/frame/caseBase.py +++ b/tests/army/frame/caseBase.py @@ -189,7 +189,13 @@ class TBase: return False - # check file exist + # check file exist def checkFileExist(self, pathFile): if os.path.exists(pathFile) == False: - tdLog.exit(f"file not exist {pathFile}") \ No newline at end of file + tdLog.exit(f"file not exist {pathFile}") + + # check list not exist + def checkListNotEmpty(self, lists, tips=""): + if len(lists) == 0: + tdLog.exit(f"list is empty {tips}") + diff --git a/tests/army/frame/srvCtl.py b/tests/army/frame/srvCtl.py index 6c97d6bbc4..c01ea33578 100644 --- a/tests/army/frame/srvCtl.py +++ b/tests/army/frame/srvCtl.py @@ -28,6 +28,19 @@ class srvCtl: self.mLevel = 0 self.mLevelDisk = 0 + # + # control server + # + + # start + def dnodeStart(self, idx): + return tdDnodes.starttaosd(idx) + + # stop + def dnodeStop(self, idx): + return tdDnodes.stoptaosd(idx) + + # # about path #