Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
879946c9
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看板
未验证
提交
879946c9
编写于
8月 31, 2022
作者:
sangshuduo
提交者:
GitHub
8月 31, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: taosdump multiple directories (#16541)
fix: test cases
上级
33c09d9b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
15 deletion
+21
-15
tests/pytest/tools/taosdumpTest2.py
tests/pytest/tools/taosdumpTest2.py
+3
-0
tests/pytest/tools/taosdumpTest3.py
tests/pytest/tools/taosdumpTest3.py
+18
-15
未找到文件。
tests/pytest/tools/taosdumpTest2.py
浏览文件 @
879946c9
...
...
@@ -63,6 +63,7 @@ class TDTestCase:
os
.
makedirs
(
"./taosdumptest/tmp"
)
else
:
print
(
"directory exists"
)
os
.
system
(
"rm -rf ./taosdumptest/tmp/*"
)
tdSql
.
prepare
()
...
...
@@ -87,6 +88,7 @@ class TDTestCase:
os
.
system
(
"rm ./taosdumptest/tmp/*.sql"
)
os
.
system
(
"rm ./taosdumptest/tmp/*.avro*"
)
os
.
system
(
"rm -rf ./taosdumptest/taosdump.*"
)
os
.
system
(
"%s --databases db -o ./taosdumptest/tmp "
%
binPath
)
...
...
@@ -122,6 +124,7 @@ class TDTestCase:
os
.
system
(
"rm ./taosdumptest/tmp/*.sql"
)
os
.
system
(
"rm ./taosdumptest/tmp/*.avro*"
)
os
.
system
(
"rm -rf ./taosdumptest/tmp/taosdump.*"
)
os
.
system
(
"%s -D test -o ./taosdumptest/tmp -y"
%
binPath
)
tdSql
.
execute
(
"drop database test"
)
...
...
tests/pytest/tools/taosdumpTest3.py
浏览文件 @
879946c9
...
...
@@ -59,6 +59,7 @@ class TDTestCase:
os
.
makedirs
(
"./taosdumptest"
)
else
:
print
(
"directory exists"
)
os
.
system
(
"rm -rf ./taosdumptest/*"
)
for
i
in
range
(
1
,
9
):
if
not
os
.
path
.
exists
(
"./taosdumptest/tmp%d"
%
i
):
...
...
@@ -83,15 +84,15 @@ class TDTestCase:
tdSql
.
execute
(
"create table st0_0 using st0 tags(0) st0_1 using st0 tags (1) "
)
tdSql
.
execute
(
"insert into st0_0 values(16
14218412000,8537,'R')(16142184
22000,8538,'E')"
)
"insert into st0_0 values(16
61997612000,8537,'R')(16619976
22000,8538,'E')"
)
tdSql
.
execute
(
"insert into st0_1 values(16
14218413000,1537,'A')(16142184
23000,1538,'D')"
)
"insert into st0_1 values(16
61997613000,1537,'A')(16619976
23000,1538,'D')"
)
tdSql
.
execute
(
"create table if not exists gt0 (ts timestamp, c0 int, c1 float) "
)
tdSql
.
execute
(
"create table if not exists gt1 (ts timestamp, c0 int, c1 double) "
)
tdSql
.
execute
(
"insert into gt0 values(16
1421841
2000,637,8.861)"
)
tdSql
.
execute
(
"insert into gt1 values(16
1421841
3000,638,8.862)"
)
tdSql
.
execute
(
"insert into gt0 values(16
6199760
2000,637,8.861)"
)
tdSql
.
execute
(
"insert into gt1 values(16
6199760
3000,638,8.862)"
)
# create db1 , three stables:stb0,include ctables stb0_0 \ stb0_1,stb1 include ctables stb1_0 and stb1_1
# \stb3,include ctables stb3_0 and stb3_1
...
...
@@ -103,35 +104,35 @@ class TDTestCase:
tdSql
.
execute
(
"create table st0_0 using st0 tags(0) st0_1 using st0 tags(1) "
)
tdSql
.
execute
(
"insert into st0_0 values(16
14218412000,8600,'R')(161
4218422000,8600,'E')"
)
"insert into st0_0 values(16
54218412000,8600,'R')(165
4218422000,8600,'E')"
)
tdSql
.
execute
(
"insert into st0_1 values(16
14218413000,8601,'A')(161
4218423000,8601,'D')"
)
"insert into st0_1 values(16
54218413000,8601,'A')(165
4218423000,8601,'D')"
)
tdSql
.
execute
(
"create stable st1(ts timestamp, c11 float, c12 nchar(10)) tags(t1 int)"
)
tdSql
.
execute
(
"create table st1_0 using st1 tags(0) st1_1 using st1 tags(1) "
)
tdSql
.
execute
(
"insert into st1_0 values(16
14218412000,8610.1,'R')(161
4218422000,8610.1,'E')"
)
"insert into st1_0 values(16
54218412000,8610.1,'R')(165
4218422000,8610.1,'E')"
)
tdSql
.
execute
(
"insert into st1_1 values(16
14218413000,8611.2,'A')(161
4218423000,8611.1,'D')"
)
"insert into st1_1 values(16
54218413000,8611.2,'A')(165
4218423000,8611.1,'D')"
)
tdSql
.
execute
(
"create stable st2(ts timestamp, c21 float, c22 nchar(10)) tags(t1 int)"
)
tdSql
.
execute
(
"create table st2_0 using st2 tags(0) st2_1 using st2 tags(1) "
)
tdSql
.
execute
(
"insert into st2_0 values(16
14218412000,8620.3,'R')(161
4218422000,8620.3,'E')"
)
"insert into st2_0 values(16
54218412000,8620.3,'R')(165
4218422000,8620.3,'E')"
)
tdSql
.
execute
(
"insert into st2_1 values(16
14218413000,8621.4,'A')(161
4218423000,8621.4,'D')"
)
"insert into st2_1 values(16
54218413000,8621.4,'A')(165
4218423000,8621.4,'D')"
)
tdSql
.
execute
(
"create table if not exists gt0 (ts timestamp, c00 int, c01 float) "
)
tdSql
.
execute
(
"create table if not exists gt1 (ts timestamp, c10 int, c11 double) "
)
tdSql
.
execute
(
"create table if not exists gt2 (ts timestamp, c20 int, c21 float) "
)
tdSql
.
execute
(
"insert into gt0 values(16
1
4218412700,8637,78.86155)"
)
tdSql
.
execute
(
"insert into gt0 values(16
5
4218412700,8637,78.86155)"
)
tdSql
.
execute
(
"insert into gt1 values(16
1
4218413800,8638,78.862020199)"
)
tdSql
.
execute
(
"insert into gt2 values(16
1
4218413900,8639,78.863)"
)
"insert into gt1 values(16
5
4218413800,8638,78.862020199)"
)
tdSql
.
execute
(
"insert into gt2 values(16
5
4218413900,8639,78.863)"
)
# create
tdSql
.
execute
(
"create database if not exists dp3 precision 'ns'"
)
...
...
@@ -141,13 +142,15 @@ class TDTestCase:
tdSql
.
execute
(
"create table st0_0 using st0 tags(0) st0_1 using st0 tags(1) "
)
tdSql
.
execute
(
"insert into st0_0 values(16
14218412000000001,8600,'R')(161
4218422000000002,8600,'E')"
)
"insert into st0_0 values(16
54218412000000001,8600,'R')(165
4218422000000002,8600,'E')"
)
tdSql
.
execute
(
"insert into st0_1 values(16
14218413000000001,8601,'A')(161
4218423000000002,8601,'D')"
)
"insert into st0_1 values(16
54218413000000001,8601,'A')(165
4218423000000002,8601,'D')"
)
# sys.exit(0)
# # taosdump stable and general table
os
.
system
(
"%s -o ./taosdumptest/tmp1 -D dp1,dp2 -T 8 "
%
binPath
)
os
.
system
(
"%s -o ./taosdumptest/tmp2 dp1 st0 gt0 -T 8 "
%
binPath
)
#sys.exit(0)
os
.
system
(
"%s -o ./taosdumptest/tmp3 dp2 st0 st1_0 gt0 -T 8 "
%
binPath
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录