From 5df84695745519636f24ef742f7716daf67400b2 Mon Sep 17 00:00:00 2001 From: cpwu Date: Thu, 4 Aug 2022 14:40:00 +0800 Subject: [PATCH] fix case --- tests/system-test/0-others/user_control.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/system-test/0-others/user_control.py b/tests/system-test/0-others/user_control.py index 037f3075f6..5dce1205c6 100644 --- a/tests/system-test/0-others/user_control.py +++ b/tests/system-test/0-others/user_control.py @@ -649,9 +649,16 @@ class TDTestCase: tdLog.printNoPrefix("==========step5: enable info") taos1_conn = taos.connect(user=self.__user_list[1], password=f"new{self.__passwd_list[1]}") taos2_conn = taos.connect(user=self.__user_list[2], password=f"new{self.__passwd_list[2]}") - tdSql.execute() - - + tdSql.execute(f"alter user {self.__user_list[1]} enable 0") + taos1_except = True + try: + taos1_conn.query("show databases") + except BaseException: + taos1_except = False + if taos1_except: + tdLog.exit("taos 1 connect except error not occured, when enable == 0, should not r/w ") + else: + tdLog.info("taos 1 connect except error occured, enable == 0") # root删除用户测试 -- GitLab