Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2ef37dea
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
未验证
提交
2ef37dea
编写于
5月 12, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
5月 12, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1888 from taosdata/feature/changshuaiqiang/testcase
add test case
上级
1469b9e3
294b4266
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
150 addition
and
1 deletion
+150
-1
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+4
-1
tests/pytest/table/del_stable.py
tests/pytest/table/del_stable.py
+50
-0
tests/script/basicSuite.sim
tests/script/basicSuite.sim
+2
-0
tests/script/general/connection/connection.sim
tests/script/general/connection/connection.sim
+21
-0
tests/script/general/db/delete_reuse2.sim
tests/script/general/db/delete_reuse2.sim
+1
-0
tests/script/general/user/authority.sim
tests/script/general/user/authority.sim
+72
-0
未找到文件。
tests/pytest/fulltest.sh
浏览文件 @
2ef37dea
...
...
@@ -84,4 +84,7 @@ python3 ./test.py $1 -f import_merge/importTRestart.py
# user
python3 ./test.py
$1
-f
user/user_create.py
python3 ./test.py
$1
-f
user/pass_len.py
\ No newline at end of file
python3 ./test.py
$1
-f
user/pass_len.py
# table
#python3 ./test.py $1 -f table/del_stable.py
\ No newline at end of file
tests/pytest/table/del_stable.py
0 → 100644
浏览文件 @
2ef37dea
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
taos
from
util.log
import
tdLog
from
util.cases
import
tdCases
from
util.sql
import
tdSql
class
TDTestCase
:
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
def
run
(
self
):
tdSql
.
prepare
()
tdSql
.
execute
(
"drop database if exists db"
)
print
(
"==============step1"
)
tdSql
.
execute
(
"create database db"
)
tdSql
.
execute
(
"create table db.st (ts timestamp, i int) tags(j int)"
)
tdSql
.
execute
(
"create table db.tb using st tags(1)"
)
tdSql
.
execute
(
"insert into db.tb values(now, 1)"
)
print
(
"==============step2"
)
try
:
tdSql
.
execute
(
"drop table db.st"
)
except
Exception
as
e
:
tdLog
.
exit
(
e
)
tdSql
.
execute
(
"select * from db.st"
)
tdSql
.
checkRows
(
1
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/script/basicSuite.sim
浏览文件 @
2ef37dea
...
...
@@ -18,3 +18,5 @@ run general/table/vgroup.sim
run general/user/basic1.sim
run general/user/pass_alter.sim
run general/vector/single.sim
run general/connection/connection.sim
run general/user/authority.sim
tests/script/general/connection/connection.sim
0 → 100644
浏览文件 @
2ef37dea
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 0
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
print ============= step1
sql close
print close1
sql connect
print ============= step2
sql close
sql connect
print ============= step3
sql close
sql connect write
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
tests/script/general/db/delete_reuse2.sim
浏览文件 @
2ef37dea
...
...
@@ -30,6 +30,7 @@ sleep 2000
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql reset query cache
print ======== step1
sql create database d1 replica 1
...
...
tests/script/general/user/authority.sim
0 → 100644
浏览文件 @
2ef37dea
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
sleep 3000
print ============= step1
sql create user read pass 'taosdata'
sql create user write pass 'taosdata'
sql show users
if $rows != 5 then
return -1
endi
print ============= step2
sql close
sql connect read
sleep 2000
sql create database dread
sql show databases
if $rows != 1 then
return -1
endi
print ============= step3
sql close
sql connect write
sleep 2000
sql create database dwrite
sql show databases
if $rows != 1 then
return -1
endi
print ============ step4
sql close
sql connect
sleep 2000
sql show databases
if $row != 2 then
return -1
endi
print ============ step5
sql close
sql connect read
sleep 2000
sql drop database dread
sql drop database dwrite -x step51
step51:
sql close
sql connect
sql show databases
if $rows != 1 then
return -1
endi
sql close
sql connect
sleep 2000
sql drop database d1
sql drop database d2
sql drop database d3
sql drop database d4
system sh/exec_up.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录