提交 82dedc76 编写于 作者: P Ping Xiao

[TD-2423]<test>: add test case

上级 70d751ba
...@@ -41,7 +41,23 @@ class TDTestCase: ...@@ -41,7 +41,23 @@ class TDTestCase:
tdSql.query("select * from ampere") tdSql.query("select * from ampere")
tdSql.checkRows(2) tdSql.checkRows(2)
tdSql.checkData(0, 6, None) tdSql.checkData(0, 6, None)
tdSql.checkData(1, 6, 'test') tdSql.checkData(1, 6, 'test')
# Test case for: https://jira.taosdata.com:18080/browse/TD-2423
tdSql.execute("create table stb(ts timestamp, col1 int, col2 nchar(20)) tags(tg1 int, tg2 binary(20), tg3 nchar(25))")
tdSql.execute("insert into tb1 using stb(tg1, tg3) tags(1, 'test1') values(now, 1, 'test1')")
tdSql.query("select *, tg1, tg2, tg3 from tb1")
tdSql.checkRows(1)
tdSql.checkData(0, 3, 1)
tdSql.checkData(0, 4, None)
tdSql.checkData(0, 5, 'test1')
tdSql.execute("create table tb2 using stb(tg3, tg2) tags('test3', 'test2')")
tdSql.query("select tg1, tg2, tg3 from tb2")
tdSql.checkRows(1)
tdSql.checkData(0, 0, None)
tdSql.checkData(0, 1, 'test2')
tdSql.checkData(0, 2, 'test3')
def stop(self): def stop(self):
tdSql.close() tdSql.close()
......
...@@ -21,8 +21,7 @@ function runSimCaseOneByOne { ...@@ -21,8 +21,7 @@ function runSimCaseOneByOne {
if [[ $line =~ ^./test.sh* ]] || [[ $line =~ ^run* ]]; then if [[ $line =~ ^./test.sh* ]] || [[ $line =~ ^run* ]]; then
case=`echo $line | grep sim$ |awk '{print $NF}'` case=`echo $line | grep sim$ |awk '{print $NF}'`
IN_TDINTERNAL="community" IN_TDINTERNAL="community"
start_time=`date +%s` start_time=`date +%s`
IN_TDINTERNAL="community"
date +%F\ %T | tee -a out.log date +%F\ %T | tee -a out.log
if [[ "$tests_dir" == *"$IN_TDINTERNAL"* ]]; then if [[ "$tests_dir" == *"$IN_TDINTERNAL"* ]]; then
echo -n $case echo -n $case
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册