From fbc274b41a4fd4780126dea7859987ceef0a90b3 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 13 Mar 2025 17:40:13 +0800 Subject: [PATCH] fix: create user no read privilage on enterprise version --- .../army/tools/taosdump/native/taosdumpCommandline.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/army/tools/taosdump/native/taosdumpCommandline.py b/tests/army/tools/taosdump/native/taosdumpCommandline.py index cd9c6777c9..6cf9acf4b2 100644 --- a/tests/army/tools/taosdump/native/taosdumpCommandline.py +++ b/tests/army/tools/taosdump/native/taosdumpCommandline.py @@ -217,18 +217,21 @@ class TDTestCase(TBase): # password def checkPassword(self, tmpdir): # 255 char max password + user = "dkj" 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) + # enterprise must set + sql = f"grant read on test to {user}" tdSql.execute(sql) - pwd = "taosdata" cmds = [ - f"-uroot -p{pwd} -D test -o {tmpdir}", # command pass - f"-uroot -p < {pwdFile} -D test -o {tmpdir}" # input pass + f"-u{user} -p{pwd} -D test -o {tmpdir}", # command pass + f"-u{user} -p < {pwdFile} -D test -o {tmpdir}" # input pass ] for cmd in cmds: