From 4c6be2464ed6670a9597f9534df16f72560823ae Mon Sep 17 00:00:00 2001 From: Chris Zhai Date: Tue, 14 May 2024 15:25:59 +0800 Subject: [PATCH 1/2] add test cases for TD-29904 --- tests/army/community/query/show.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/army/community/query/show.py b/tests/army/community/query/show.py index 9192aee06e..2fbfd6cdfb 100644 --- a/tests/army/community/query/show.py +++ b/tests/army/community/query/show.py @@ -125,10 +125,13 @@ class TDTestCase(TBase): sqls = [ "show scores;", "SHOW CLUSTER VARIABLES", - "SHOW BNODES;", + # "SHOW BNODES;", ] tdSql.executes(sqls) + # verification for TD-29904 + tdSql.error("show tags from t100000", expectErrInfo='Fail to get table info, error: Table does not exist') + # run def run(self): @@ -143,6 +146,9 @@ class TDTestCase(TBase): # do action self.doQuery() + # check show + self.checkShow() + tdLog.success(f"{__file__} successfully executed") From 72daedc2fd5b29c051f97a059442243ed8f9dfbe Mon Sep 17 00:00:00 2001 From: Chris Zhai Date: Tue, 14 May 2024 17:20:55 +0800 Subject: [PATCH 2/2] update test cases --- tests/army/community/query/show.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/army/community/query/show.py b/tests/army/community/query/show.py index 2fbfd6cdfb..980e60387a 100644 --- a/tests/army/community/query/show.py +++ b/tests/army/community/query/show.py @@ -102,6 +102,22 @@ class TDTestCase(TBase): allRows = self.insert_rows * self.childtable_count tdSql.checkFirstValue(sql, allRows) + def checkShowTags(self): + # verification for TD-29904 + tdSql.error("show tags from t100000", expectErrInfo='Fail to get table info, error: Table does not exist') + + sql = "show tags from child1" + tdSql.query(sql) + tdSql.checkRows(5) + + sql = f"show tags from child1 from {self.db}" + tdSql.query(sql) + tdSql.checkRows(5) + + sql = f"show tags from {self.db}.child1" + tdSql.query(sql) + tdSql.checkRows(5) + def checkShow(self): # not support sql = "show accounts;" @@ -129,8 +145,7 @@ class TDTestCase(TBase): ] tdSql.executes(sqls) - # verification for TD-29904 - tdSql.error("show tags from t100000", expectErrInfo='Fail to get table info, error: Table does not exist') + self.checkShowTags() # run