From 9a8d4c9f4c6a7a7e86d910b810b7143a4e8d2664 Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Tue, 19 Jan 2021 18:27:41 +0800 Subject: [PATCH] [TD-2720][TD-2247]: add test case --- tests/pytest/account/account_create.py | 12 ++++++++++++ tests/pytest/alter/alter_table.py | 2 ++ 2 files changed, 14 insertions(+) diff --git a/tests/pytest/account/account_create.py b/tests/pytest/account/account_create.py index 85adfff199..c008acccd8 100644 --- a/tests/pytest/account/account_create.py +++ b/tests/pytest/account/account_create.py @@ -24,6 +24,17 @@ class TDTestCase: tdSql.init(conn.cursor(), logSql) def run(self): + tdSql.query("show users") + rows = tdSql.queryRows + + tdSql.execute("create user test PASS 'test' ") + tdSql.query("show users") + tdSql.checkRows(rows + 1) + + tdSql.error("create user tdenginetdenginetdengine PASS 'test' ") + + tdSql.error("create user tdenginet PASS '1234512345123456' ") + try: tdSql.execute("create account a&cc PASS 'pass123'") except Exception as e: @@ -31,6 +42,7 @@ class TDTestCase: return tdLog.exit("drop built-in user is error.") + def stop(self): tdSql.close() diff --git a/tests/pytest/alter/alter_table.py b/tests/pytest/alter/alter_table.py index 2982492f65..48b0154361 100644 --- a/tests/pytest/alter/alter_table.py +++ b/tests/pytest/alter/alter_table.py @@ -126,6 +126,8 @@ class TDTestCase: for i in range(2, size): tdSql.checkData(0, i, self.rowNum * (size - i)) + tdSql.error("alter local debugflag 143") + tdSql.execute("create table st(ts timestamp, c1 int) tags(t1 float)") tdSql.execute("create table t0 using st tags(null)") tdSql.execute("alter table t0 set tag t1=2.1")