Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0839e57d
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0839e57d
编写于
6月 20, 2022
作者:
P
Ping Xiao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: add test cases
上级
ac94bb85
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
5 deletion
+25
-5
tests/pytest/dbmgmt/dbNameCaseSensitive.py
tests/pytest/dbmgmt/dbNameCaseSensitive.py
+3
-0
tests/pytest/table/columnNameCaseSensitive.py
tests/pytest/table/columnNameCaseSensitive.py
+6
-1
tests/pytest/table/tagNameCaseSensitive.py
tests/pytest/table/tagNameCaseSensitive.py
+6
-1
tests/pytest/table/tbNameCaseSensitive.py
tests/pytest/table/tbNameCaseSensitive.py
+10
-3
未找到文件。
tests/pytest/dbmgmt/dbNameCaseSensitive.py
浏览文件 @
0839e57d
...
@@ -52,6 +52,7 @@ class TDTestCase:
...
@@ -52,6 +52,7 @@ class TDTestCase:
tdSql
.
checkRows
(
0
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
"show create database `Db`"
)
tdSql
.
query
(
"show create database `Db`"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
1
,
"CREATE DATABASE `Db` REPLICA 1 QUORUM 1 DAYS 10 KEEP 3650 CACHE 16 BLOCKS 6 MINROWS 100 MAXROWS 4096 WAL 2 FSYNC 1000 COMP 2 CACHELAST 0 PRECISION 'ms' UPDATE 0"
)
tdSql
.
execute
(
"drop database db"
)
tdSql
.
execute
(
"drop database db"
)
...
@@ -67,6 +68,8 @@ class TDTestCase:
...
@@ -67,6 +68,8 @@ class TDTestCase:
tdSql
.
query
(
"show databases"
)
tdSql
.
query
(
"show databases"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
"电力系统"
)
tdSql
.
checkData
(
0
,
0
,
"电力系统"
)
tdSql
.
query
(
"show create database `电力系统`"
)
tdSql
.
checkData
(
0
,
1
,
"CREATE DATABASE `电力系统` REPLICA 1 QUORUM 1 DAYS 10 KEEP 3650 CACHE 16 BLOCKS 6 MINROWS 100 MAXROWS 4096 WAL 2 FSYNC 1000 COMP 2 CACHELAST 0 PRECISION 'ms' UPDATE 0"
)
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
...
...
tests/pytest/table/columnNameCaseSensitive.py
浏览文件 @
0839e57d
...
@@ -136,6 +136,9 @@ class TDTestCase:
...
@@ -136,6 +136,9 @@ class TDTestCase:
tdSql
.
query
(
"select `C1` as a from `STB2` where `C1` = 1"
)
tdSql
.
query
(
"select `C1` as a from `STB2` where `C1` = 1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"show create table `STB2`"
)
tdSql
.
checkData
(
0
,
1
,
"CREATE TABLE `STB2` (`ts` TIMESTAMP,`c1` INT,`C1` INT) TAGS (`t1` INT)"
)
tdSql
.
execute
(
"alter table `STB2` drop column `C1`"
)
tdSql
.
execute
(
"alter table `STB2` drop column `C1`"
)
tdSql
.
query
(
"describe tb2"
)
tdSql
.
query
(
"describe tb2"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
...
@@ -143,6 +146,8 @@ class TDTestCase:
...
@@ -143,6 +146,8 @@ class TDTestCase:
# cornor cases
# cornor cases
tdSql
.
execute
(
"alter table `STB2` add column `数量` int"
)
tdSql
.
execute
(
"alter table `STB2` add column `数量` int"
)
tdSql
.
execute
(
"insert into tt3(ts, `数量`) using `STB2` tags(2) values(now + 3s, 1)"
)
tdSql
.
execute
(
"insert into tt3(ts, `数量`) using `STB2` tags(2) values(now + 3s, 1)"
)
tdSql
.
query
(
"show create table `STB2`"
)
tdSql
.
checkData
(
0
,
1
,
"CREATE TABLE `STB2` (`ts` TIMESTAMP,`c1` INT,`数量` INT) TAGS (`t1` INT)"
)
tdSql
.
query
(
"select * from tt3"
)
tdSql
.
query
(
"select * from tt3"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select ts `TS` from tt3"
)
tdSql
.
query
(
"select ts `TS` from tt3"
)
...
@@ -151,7 +156,7 @@ class TDTestCase:
...
@@ -151,7 +156,7 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select ts as `时间戳` from tt3"
)
tdSql
.
query
(
"select ts as `时间戳` from tt3"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select ts `时间戳` from tt3"
)
tdSql
.
query
(
"select ts `时间戳` from tt3"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
def
stop
(
self
):
def
stop
(
self
):
...
...
tests/pytest/table/tagNameCaseSensitive.py
浏览文件 @
0839e57d
...
@@ -34,13 +34,18 @@ class TDTestCase:
...
@@ -34,13 +34,18 @@ class TDTestCase:
tdSql
.
query
(
"select t1, `T1` from `STB3`"
)
tdSql
.
query
(
"select t1, `T1` from `STB3`"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
tdSql
.
query
(
"show create table `STB3`"
)
tdSql
.
checkData
(
0
,
1
,
"CREATE TABLE `STB3` (`ts` TIMESTAMP,`c1` INT) TAGS (`t1` INT,`T1` INT)"
)
tdSql
.
execute
(
"alter table `STB3` drop tag `T1`"
)
tdSql
.
execute
(
"alter table `STB3` drop tag `T1`"
)
tdSql
.
query
(
"describe `STB3`"
)
tdSql
.
query
(
"describe `STB3`"
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkRows
(
3
)
# cornor case
# cornor case
tdSql
.
execute
(
"create table `STB5`(ts timestamp, c1 int) tags(t1 int, `标签` int)"
)
tdSql
.
execute
(
"create table `STB5`(ts timestamp, c1 int) tags(t1 int, `标签` int)"
)
tdSql
.
execute
(
"insert into `测试` using `STB5` tags(1, 1) values(now, 1)"
)
tdSql
.
execute
(
"insert into `测试` using `STB5` tags(1, 1) values(now, 1)"
)
tdSql
.
query
(
"show create table `STB5`"
)
tdSql
.
checkData
(
0
,
1
,
"CREATE TABLE `STB5` (`ts` TIMESTAMP,`c1` INT) TAGS (`t1` INT,`标签` INT)"
)
tdSql
.
query
(
"select * from `测试`"
)
tdSql
.
query
(
"select * from `测试`"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
...
...
tests/pytest/table/tbNameCaseSensitive.py
浏览文件 @
0839e57d
...
@@ -32,6 +32,7 @@ class TDTestCase:
...
@@ -32,6 +32,7 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"show create table tb"
)
tdSql
.
query
(
"show create table tb"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
1
,
"CREATE TABLE `tb` (`ts` TIMESTAMP,`c1` INT)"
)
tdSql
.
error
(
"create table Tb(ts timestamp, c1 int)"
)
tdSql
.
error
(
"create table Tb(ts timestamp, c1 int)"
)
tdSql
.
execute
(
"create table `TB`(ts timestamp, c1 int)"
)
tdSql
.
execute
(
"create table `TB`(ts timestamp, c1 int)"
)
...
@@ -40,6 +41,7 @@ class TDTestCase:
...
@@ -40,6 +41,7 @@ class TDTestCase:
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
tdSql
.
query
(
"show create table `TB`"
)
tdSql
.
query
(
"show create table `TB`"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
1
,
"CREATE TABLE `TB` (`ts` TIMESTAMP,`c1` INT)"
)
tdSql
.
query
(
"describe tb"
)
tdSql
.
query
(
"describe tb"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
...
@@ -61,7 +63,7 @@ class TDTestCase:
...
@@ -61,7 +63,7 @@ class TDTestCase:
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
error
(
"cr
e
ate stable STb(ts timestamp, c1 int) tags(t1 int)"
)
tdSql
.
error
(
"crate stable STb(ts timestamp, c1 int) tags(t1 int)"
)
tdSql
.
error
(
"create stable `stb`(ts timestamp, c1 int) tags(t1 int)"
)
tdSql
.
error
(
"create stable `stb`(ts timestamp, c1 int) tags(t1 int)"
)
tdSql
.
execute
(
"create stable `STB`(ts timestamp, c1 int) tags(t1 int)"
)
tdSql
.
execute
(
"create stable `STB`(ts timestamp, c1 int) tags(t1 int)"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
...
@@ -88,12 +90,15 @@ class TDTestCase:
...
@@ -88,12 +90,15 @@ class TDTestCase:
tdSql
.
query
(
"select tbname from `STB`"
)
tdSql
.
query
(
"select tbname from `STB`"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
tdSql
.
execute
(
"alter table stb add column c2 int"
)
tdSql
.
execute
(
"alter table stb add column c2 int"
)
tdSql
.
execute
(
"alter table stb add tag t2 int"
)
tdSql
.
execute
(
"alter table stb add tag t2 int"
)
tdSql
.
execute
(
"alter table `STB` add column c2 int"
)
tdSql
.
execute
(
"alter table `STB` add column c2 int"
)
tdSql
.
execute
(
"alter table `STB` add tag t2 int"
)
tdSql
.
execute
(
"alter table `STB` add tag t2 int"
)
tdSql
.
execute
(
"alter table `TB` add column c2 int"
)
tdSql
.
execute
(
"alter table `TB` add column c2 int"
)
tdSql
.
query
(
"show create table `STB`"
)
tdSql
.
checkData
(
0
,
1
,
"CREATE TABLE `STB` (`ts` TIMESTAMP,`c1` INT,`c2` INT) TAGS (`t1` INT,`t2` INT)"
)
# corner cases
# corner cases
tdSql
.
execute
(
"create table `超级表`(ts timestamp, c1 int) tags(t1 int)"
)
tdSql
.
execute
(
"create table `超级表`(ts timestamp, c1 int) tags(t1 int)"
)
tdSql
.
execute
(
"create table `子表一` using `超级表` tags(1)"
)
tdSql
.
execute
(
"create table `子表一` using `超级表` tags(1)"
)
...
@@ -111,7 +116,9 @@ class TDTestCase:
...
@@ -111,7 +116,9 @@ class TDTestCase:
tdSql
.
query
(
"select * from `普通表`"
)
tdSql
.
query
(
"select * from `普通表`"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"show tables"
)
tdSql
.
query
(
"show tables"
)
tdSql
.
checkRows
(
8
)
tdSql
.
checkRows
(
8
)
tdSql
.
query
(
"show create table `普通表`"
)
tdSql
.
checkData
(
0
,
0
,
"CREATE TABLE `普通表` (`ts` TIMESTAMP,`c1` INT)"
)
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录