diff --git a/tests/system-test/0-others/user_control.py b/tests/system-test/0-others/user_control.py index ec3f8ce11a..f83865a461 100644 --- a/tests/system-test/0-others/user_control.py +++ b/tests/system-test/0-others/user_control.py @@ -6,6 +6,7 @@ import traceback from util.log import * from util.sql import * from util.cases import * +from util.dnodes import * PRIVILEGES_ALL = "ALL" @@ -282,6 +283,9 @@ class TDTestCase: self.login_err(self.__user_list[0], self.__passwd_list[0]) self.login_currrent(self.__user_list[0], f"new{self.__passwd_list[0]}") + tdDnodes.stop(1) + tdDnodes.start(1) + # 普通用户权限 # 密码登录 _, user = self.user_login(self.__user_list[0], f"new{self.__passwd_list[0]}") @@ -316,6 +320,20 @@ class TDTestCase: tdSql.checkData(0, 0, "root") tdSql.checkData(0, 1, "super") + tdDnodes.stop(1) + tdDnodes.start(1) + + # 删除后无法登录 + self.login_err(self.__user_list[0], self.__passwd_list[0]) + self.login_currrent(self.__user_list[0], f"new{self.__passwd_list[0]}") + self.login_err(self.__user_list[1], self.__passwd_list[1]) + self.login_currrent(self.__user_list[1], f"new{self.__passwd_list[1]}") + + tdSql.query("show users") + tdSql.checkRows(1) + tdSql.checkData(0, 0, "root") + tdSql.checkData(0, 1, "super") + def stop(self): tdSql.close()