From 82dedc7683e8ef35175a5a2c5e590b14601c9099 Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Sat, 20 Feb 2021 16:57:23 +0800 Subject: [PATCH] [TD-2423]: add test case --- tests/pytest/tag_lite/alter_tag.py | 18 +++++++++++++++++- tests/test-all.sh | 3 +-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/pytest/tag_lite/alter_tag.py b/tests/pytest/tag_lite/alter_tag.py index aafffc19c3..9e5abb6c13 100644 --- a/tests/pytest/tag_lite/alter_tag.py +++ b/tests/pytest/tag_lite/alter_tag.py @@ -41,7 +41,23 @@ class TDTestCase: tdSql.query("select * from ampere") tdSql.checkRows(2) 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): tdSql.close() diff --git a/tests/test-all.sh b/tests/test-all.sh index 8a9745295b..f03e3f88c3 100755 --- a/tests/test-all.sh +++ b/tests/test-all.sh @@ -21,8 +21,7 @@ function runSimCaseOneByOne { if [[ $line =~ ^./test.sh* ]] || [[ $line =~ ^run* ]]; then case=`echo $line | grep sim$ |awk '{print $NF}'` IN_TDINTERNAL="community" - start_time=`date +%s` - IN_TDINTERNAL="community" + start_time=`date +%s` date +%F\ %T | tee -a out.log if [[ "$tests_dir" == *"$IN_TDINTERNAL"* ]]; then echo -n $case -- GitLab