fix: add 255 length password test case

This commit is contained in:
Alex Duan 2025-03-10 11:41:09 +08:00
parent f60219e2f0
commit 4daa71b6be
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1 @@
abcdefghigklmnopqrstuvwxyz@ABC1234567aaaaaaaaaaeeeeeeeeeeAAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDEEEEEEEEEAAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDEEEEEEEEEAAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDEEEEEEEEEAAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDAAAAEND

View File

@ -213,6 +213,26 @@ class TDTestCase(TBase):
rlist = self.taos(arg[0])
if arg[1] != None:
self.checkListString(rlist, arg[1])
# password
def checkPassword(self):
# 255 char max password
pwd = ""
pwdFile = "cmdline/data/pwdMax.txt"
with open(pwdFile) as file:
pwd = file.readline()
sql = f"create user dkj pass '{pwd}' "
tdSql.execute(sql)
cmds = [
f"-udkj -p{pwd} -s show databases;", # command pass
f"-udkj -p < {pwdFile} -s show databases;" # input pass
]
for cmd in cmds:
rlist = self.taos(cmd)
self.checkListString("Query OK,")
# run
def run(self):
@ -236,6 +256,9 @@ class TDTestCase(TBase):
# check data in/out
self.checkDumpInOut()
# max password
self.checkPassword()
tdLog.success(f"{__file__} successfully executed")