diff --git a/tests/system-test/1-insert/test_td29157.py b/tests/system-test/1-insert/test_td29157.py index a5a04f2f51..69ce60c6a9 100644 --- a/tests/system-test/1-insert/test_td29157.py +++ b/tests/system-test/1-insert/test_td29157.py @@ -13,18 +13,38 @@ class TDTestCase: self.db_name = "td29157" def run(self): - # self.conn = taos.self.connect(host='192.168.1.51', user='root', password='taosdata') self.conn.execute(f"drop database if exists {self.db_name}") self.conn.execute(f"CREATE DATABASE {self.db_name}") self.conn.execute(f"USE {self.db_name}") - tdSql.execute("create table stb3 (ts timestamp, c0 varbinary(10)) tags(t0 varbinary(10));") - tdSql.execute("insert into ctb3 using stb3 tags(\"0x01\") values(now,NULL);") - tdSql.query("show tags from ctb3;") + tdSql.execute("create table stb1 (ts timestamp, c0 varbinary(10)) tags(t0 varbinary(10));") + tdSql.execute("insert into ctb11 using stb1 tags(\"0x11\") values(now,\"0x01\");") + tdSql.execute("insert into ctb12 using stb1 tags(\"0x22\") values(now,\"0x02\");") + tdSql.query("show tags from ctb11;") + tdSql.checkRows(1) + tdSql.checkData(0, 3, 't0') + tdSql.checkData(0, 4, 'VARBINARY(10)') + tdSql.checkData(0, 5, '\\x30783131') - tdSql.execute("create table stb7 (ts timestamp, c0 geometry(500)) tags(t0 geometry(100));") - tdSql.execute("insert into ctb7 using stb7 tags('LINESTRING (1.000000 1.000000, 2.000000 2.000000, 5.000000 5.000000)') values(now,'POLYGON((1.0 1.0, 2.0 2.0, 1.0 1.0))');") - tdSql.query("show tags from ctb7;") + tdSql.execute("create table stb2 (ts timestamp, c0 geometry(500)) tags(t0 geometry(100));") + tdSql.execute("insert into ctb2 using stb2 tags('LINESTRING (1.000000 1.000000, 2.000000 2.000000, 5.000000 5.000000)') values(now,'POLYGON((1.0 1.0, 2.0 2.0, 1.0 1.0))');") + tdSql.query("show tags from ctb2;") + tdSql.checkRows(1) + tdSql.checkData(0, 3, 't0') + tdSql.checkData(0, 4, 'GEOMETRY(100)') + tdSql.checkData(0, 5, 'LINESTRING (1.000000 1.000000, 2.000000 2.000000, 5.000000 5.000000)') + + tdSql.execute("create table stb3 (ts timestamp, c0 bigint, c1 varchar(10)) tags(t0 geometry(100), t1 varbinary(10));") + tdSql.execute("insert into ctb3 using stb3 tags('POLYGON EMPTY', \"0x03\") values(now,100, \"abc\");") + tdSql.query("show tags from ctb3;") + tdSql.checkRows(2) + tdSql.checkData(0, 3, 't0') + tdSql.checkData(0, 4, 'GEOMETRY(100)') + tdSql.checkData(0, 5, 'POLYGON EMPTY') + tdSql.checkData(1, 3, 't1') + tdSql.checkData(1, 4, 'VARBINARY(10)') + tdSql.checkData(1, 5, '\\x30783033') + def stop(self): tdSql.execute("drop database if exists %s" % self.db_name)