diff --git a/tests/army/community/cmdline/fullopt.py b/tests/army/community/cmdline/fullopt.py index f6baf5b004..70be4eb920 100644 --- a/tests/army/community/cmdline/fullopt.py +++ b/tests/army/community/cmdline/fullopt.py @@ -40,6 +40,40 @@ class TDTestCase(TBase): def doTaos(self): tdLog.info(f"check taos command options...") + # help + rets = etool.runBinFile("taos", "--help") + self.checkListNotEmpty(rets) + # b r w s + sql = f"select * from {self.db}.{self.stb} limit 10" + rets = etool.runBinFile("taos", f'-B -r -w -s "{sql}" ') + self.checkListNotEmpty(rets) + # -C + rets = etool.runBinFile("taos", "-C") + self.checkListNotEmpty(rets) + # -t + rets = etool.runBinFile("taos", "-t") + self.checkListNotEmpty(rets) + # -v + rets = etool.runBinFile("taos", "-V") + self.checkListNotEmpty(rets) + # -? + rets = etool.runBinFile("taos", "-?") + self.checkListNotEmpty(rets) + + # TSDB_FQDN_LEN = 128 + lname = "testhostnamelength" + lname.rjust(130, 'a') + + # invalid + sql = f"show vgroups;" + etool.exeBinFile("taos", f'-h {lname} -s "{sql}" ', wait=False) + etool.exeBinFile("taos", f'-u {lname} -s "{sql}" ', wait=False) + etool.exeBinFile("taos", f'-d {lname} -s "{sql}" ', wait=False) + etool.exeBinFile("taos", f'-a {lname} -s "{sql}" ', wait=False) + etool.exeBinFile("taos", f'-p{lname} -s "{sql}" ', wait=False) + + etool.exeBinFile("taos", f'-N 200 -l 2048 -s "{sql}" ', wait=False) + etool.exeBinFile("taos", f'-n server', wait=False) def doTaosd(self): @@ -81,6 +115,10 @@ class TDTestCase(TBase): sc.dnodeStop(idx) etool.exeBinFile("taosd", f"-e def -c {cfg}", False) + # stop taosd test taos as server + sc.dnodeStop(idx) + etool.exeBinFile("taos", f'-n server', wait=False) + # run def run(self): tdLog.debug(f"start to excute {__file__}") @@ -94,6 +132,8 @@ class TDTestCase(TBase): # do action self.doTaosd() + + tdLog.success(f"{__file__} successfully executed") diff --git a/tests/army/frame/eos.py b/tests/army/frame/eos.py index 6bd8fd3aab..802b62e052 100644 --- a/tests/army/frame/eos.py +++ b/tests/army/frame/eos.py @@ -61,7 +61,7 @@ def exeNoWait(file): cmd = f"mintty -h never {file}" else: cmd = f"nohup {file} > /dev/null 2>&1 & " - return exe(file) + return exe(cmd) # run return output and error def run(command, timeout = 10): diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index a3f35cbef0..119e0ed334 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -11,7 +11,7 @@ ,,y,army,./pytest.sh python3 ./test.py -f enterprise/multi-level/mlevel_basic.py -N 3 -L 3 -D 2 ,,y,army,./pytest.sh python3 ./test.py -f enterprise/s3/s3_basic.py -L 3 -D 1 ,,y,army,./pytest.sh python3 ./test.py -f community/cluster/snapshot.py -N 3 -L 3 -D 2 -,,y,army,./pytest.sh python3 ./test.py -f community/cmdline/fullopt.py +,,n,army,./pytest.sh python3 ./test.py -f community/cmdline/fullopt.py #