未验证 提交 60b68dcf 编写于 作者: H Hui Li 提交者: GitHub

Merge pull request #11014 from taosdata/xiaoping/cases

[TS-1366]<test>: add test case
...@@ -804,3 +804,4 @@ ...@@ -804,3 +804,4 @@
1,,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/demo.py 1,,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/demo.py
8,,pytest,python3 test.py -f update/update2.py 8,,pytest,python3 test.py -f update/update2.py
4,,pytest,python3 test.py -f insert/line_insert.py 4,,pytest,python3 test.py -f insert/line_insert.py
20,,pytest,python3 test.py -f table/create.py
...@@ -106,9 +106,9 @@ class TDTestCase: ...@@ -106,9 +106,9 @@ class TDTestCase:
tdSql.query("select _block_dist() from db.`%s` ; " %self.stb1) tdSql.query("select _block_dist() from db.`%s` ; " %self.stb1)
tdSql.checkRows(0) tdSql.checkRows(0)
tdSql.query("show create stable db.`%s` ; " %self.stb1) tdSql.query("show create table db.`%s` ; " %self.stb1)
tdSql.checkData(0, 0, self.stb1) tdSql.checkData(0, 0, self.stb1)
tdSql.checkData(0, 1, "create table `%s` (ts TIMESTAMP,i INT) TAGS (j INT)" %self.stb1) tdSql.checkData(0, 1, "CREATE TABLE `%s` (`ts` TIMESTAMP,`i` INT) TAGS (`j` INT)" %self.stb1)
tdSql.execute("create table db.`table!1` using db.`%s` tags(1)" %self.stb1) tdSql.execute("create table db.`table!1` using db.`%s` tags(1)" %self.stb1)
tdSql.query("describe db.`table!1` ; ") tdSql.query("describe db.`table!1` ; ")
...@@ -221,7 +221,7 @@ class TDTestCase: ...@@ -221,7 +221,7 @@ class TDTestCase:
tdSql.query("show create stable `%s` ; " %self.stb2) tdSql.query("show create stable `%s` ; " %self.stb2)
tdSql.checkData(0, 0, self.stb2) tdSql.checkData(0, 0, self.stb2)
tdSql.checkData(0, 1, "create table `%s` (ts TIMESTAMP,i INT) TAGS (j INT)" %self.stb2) tdSql.checkData(0, 1, "CREATE TABLE `%s` (`ts` TIMESTAMP,`i` INT) TAGS (`j` INT)" %self.stb2)
tdSql.execute("create table `table!2` using `%s` tags(1)" %self.stb2) tdSql.execute("create table `table!2` using `%s` tags(1)" %self.stb2)
tdSql.query("describe `table!2` ; ") tdSql.query("describe `table!2` ; ")
...@@ -310,7 +310,7 @@ class TDTestCase: ...@@ -310,7 +310,7 @@ class TDTestCase:
tdSql.query("show create table `%s` ; " %self.regular_table) tdSql.query("show create table `%s` ; " %self.regular_table)
tdSql.checkData(0, 0, self.regular_table) tdSql.checkData(0, 0, self.regular_table)
tdSql.checkData(0, 1, "CREATE TABLE `%s` (ts TIMESTAMP,i INT)" %self.regular_table) tdSql.checkData(0, 1, "CREATE TABLE `%s` (`ts` TIMESTAMP,`i` INT)" %self.regular_table)
tdSql.execute("insert into `%s` values(now, 1)" %self.regular_table) tdSql.execute("insert into `%s` values(now, 1)" %self.regular_table)
tdSql.query("select * from `%s` ; " %self.regular_table) tdSql.query("select * from `%s` ; " %self.regular_table)
...@@ -341,7 +341,12 @@ class TDTestCase: ...@@ -341,7 +341,12 @@ class TDTestCase:
tdSql.error("select * from `%s`" %self.regular_table) tdSql.error("select * from `%s`" %self.regular_table)
# TS-1366
tdSql.execute("create table meters(ts timestamp, c1 int) tags(t1 int, t2 tinyint unsigned, t3 smallint unsigned, t4 int unsigned, t5 bigint unsigned, t6 int)")
tdSql.execute("create table meter1 using meters tags(1, 2, 3, 4, 5, 6)")
tdSql.query("show create table meter1")
tdSql.checkData(0, 1, "CREATE TABLE `meter1` USING `meters` TAGS (1,2,3,4,5,6)")
def stop(self): def stop(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册