fix: add taos command line test
This commit is contained in:
parent
5e47bc8e3a
commit
cc909d7d30
|
@ -40,6 +40,40 @@ class TDTestCase(TBase):
|
||||||
|
|
||||||
def doTaos(self):
|
def doTaos(self):
|
||||||
tdLog.info(f"check taos command options...")
|
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):
|
def doTaosd(self):
|
||||||
|
@ -81,6 +115,10 @@ class TDTestCase(TBase):
|
||||||
sc.dnodeStop(idx)
|
sc.dnodeStop(idx)
|
||||||
etool.exeBinFile("taosd", f"-e def -c {cfg}", False)
|
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
|
# run
|
||||||
def run(self):
|
def run(self):
|
||||||
tdLog.debug(f"start to excute {__file__}")
|
tdLog.debug(f"start to excute {__file__}")
|
||||||
|
@ -95,6 +133,8 @@ class TDTestCase(TBase):
|
||||||
self.doTaosd()
|
self.doTaosd()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tdLog.success(f"{__file__} successfully executed")
|
tdLog.success(f"{__file__} successfully executed")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ def exeNoWait(file):
|
||||||
cmd = f"mintty -h never {file}"
|
cmd = f"mintty -h never {file}"
|
||||||
else:
|
else:
|
||||||
cmd = f"nohup {file} > /dev/null 2>&1 & "
|
cmd = f"nohup {file} > /dev/null 2>&1 & "
|
||||||
return exe(file)
|
return exe(cmd)
|
||||||
|
|
||||||
# run return output and error
|
# run return output and error
|
||||||
def run(command, timeout = 10):
|
def run(command, timeout = 10):
|
||||||
|
|
|
@ -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/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 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/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
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue