提交 c17fa778 编写于 作者: P Ping Xiao

add client test cases

上级 7f2fcf84
......@@ -26,7 +26,7 @@ class TDTestCase:
tdSql.prepare()
ret = tdSql.query('select database()')
tdSql.checkData(0, 0, "db")
tdSql.checkData(0, 0, "db")
ret = tdSql.query('select server_version()')
tdSql.checkData(0, 0, "2.0.0.0")
......@@ -45,6 +45,20 @@ class TDTestCase:
ret = tdSql.execute('alter dnode "%s" debugFlag 135' % tdSql.getData(0,0))
tdLog.info('alter dnode "%s" debugFlag 135 -> ret: %d' % (tdSql.getData(0, 0), ret))
ret = tdSql.query('show mnodes')
tdSql.checkRows(1)
ret = tdSql.query('show vgroups')
tdSql.checkRows(0)
tdSql.execute('set max_binary_display_width 40')
tdSql.execute('drop database db')
ret = tdSql.query('select database()')
tdSql.checkData(0, 0, None)
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
......@@ -48,6 +48,18 @@ class TDTestCase:
"import INTO dev_001 VALUES ('2020-05-13 10:00:00.000', 1),('2020-05-13 10:00:00.001', 1)")
tdSql.checkAffectedRows(2)
tdSql.execute(
"CREATE TABLE if not exists dev_002 using st tags('dev_01')")
tdSql.execute(
"CREATE TABLE if not exists dev_003 using st tags('dev_01')")
print("==============step4")
tdLog.info("multiple tables inserts by insert")
tdSql.execute(
'''insert INTO dev_002 VALUES ('2020-05-13 10:00:00.000', 1),('2020-05-13 10:00:00.001', 1)
dev_003 VALUES ('2020-05-13 10:00:00.000', 2),('2020-05-13 10:00:00.001', 3)''')
tdSql.checkAffectedRows(4)
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册