enh: password include special char

This commit is contained in:
Alex Duan 2025-03-14 11:35:10 +08:00
parent 7142f02ae2
commit 993015a8d5
3 changed files with 7 additions and 8 deletions

View File

@ -1 +1 @@
abcdefghigklmnopqrstuvwxyz@ABC1234567aaaaaaaaaaeeeeeeeeeeAAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDEEEEEEEEEAAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDEEEEEEEEEAAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDEEEEEEEEEAAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDAAAAEND
abcdefghigklmnopqrstuvwxyz@ABCDEFGHIGKLMNOPQRSTUVWXYZ123456789!@#$%^&*()-_+=[]{}:;><?|~,.AAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDEEEEEEEEEAAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDEEEEEEEEEAAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDEEEEEEEEEAAAAAAAAAAAABBBBEND

View File

@ -217,17 +217,18 @@ class TDTestCase(TBase):
# password
def checkPassword(self):
# 255 char max password
user = "test_user"
pwd = ""
pwdFile = "cmdline/data/pwdMax.txt"
with open(pwdFile) as file:
pwd = file.readline()
sql = f"create user dkj pass '{pwd}' "
sql = f"create user {user} pass '{pwd}' "
tdSql.execute(sql)
cmds = [
f"-udkj -p{pwd} -s 'show databases;'", # command pass
f"-udkj -p < {pwdFile} -s 'show databases;'" # input pass
f"-u{user} -p{pwd} -s 'show databases;'", # command pass
f"-u{user} -p < {pwdFile} -s 'show databases;'" # input pass
]
for cmd in cmds:

View File

@ -177,14 +177,12 @@ class TDTestCase(TBase):
# executes
for item in checkItems:
self.clearPath(tmpdir)
self.clearPath(tmpdir) # clear tmp
command = item[0]
results = item[1]
rlist = self.taosdump(command)
for result in results:
self.checkListString(rlist, result)
# clear tmp
# check except
def checkExcept(self, command):
@ -217,7 +215,7 @@ class TDTestCase(TBase):
# password
def checkPassword(self, tmpdir):
# 255 char max password
user = "dkj"
user = "test_user"
pwd = ""
pwdFile = "cmdline/data/pwdMax.txt"
with open(pwdFile) as file: