提交 cccfdd81 编写于 作者: haoranc's avatar haoranc

[TD-5898]<test>add testcase of taosdumping dbname and stbname

上级 2dbd7795
......@@ -116,60 +116,72 @@ class TDTestCase:
os.system("%staosdump -o ./taosdumptest/tmp3 dp2 st0 st1_0 gt0" % binPath)
os.system("%staosdump -o ./taosdumptest/tmp4 dp2 st0 st2 gt0 gt2" % binPath)
#check taosdumptest/tmp1
tdSql.execute("drop database dp1")
tdSql.execute("drop database dp2")
os.system("%staosdump -i ./taosdumptest/tmp1 -T 2 " % binPath)
tdSql.execute("use dp1")
tdSql.query("show stables")
tdSql.checkRows(1)
tdSql.query("show tables")
tdSql.checkRows(4)
tdSql.execute("use dp2")
tdSql.query("show stables")
tdSql.checkRows(3)
tdSql.query("show tables")
tdSql.checkRows(9)
#check taosdumptest/tmp2
tdSql.execute("drop database dp1")
tdSql.execute("drop database dp2")
os.system("%staosdump -i ./taosdumptest/tmp2 -T 2 " % binPath)
tdSql.execute("use dp1")
tdSql.query("show stables")
tdSql.checkRows(1)
tdSql.query("show tables")
tdSql.checkRows(3)
tdSql.error("use dp2")
#check taosdumptest/tmp3
tdSql.execute("drop database dp1")
os.system("%staosdump -i ./taosdumptest/tmp3 -T 2 " % binPath)
tdSql.execute("use dp2")
tdSql.query("show stables")
tdSql.checkRows(2)
tdSql.query("show tables")
tdSql.checkRows(4)
tdSql.query("select count(*) from st1_0")
tdSql.error("use dp1")
tdSql.error("select count(*) from st2_0")
tdSql.error("select count(*) from gt2")
#check taosdumptest/tmp4
tdSql.execute("drop database dp2")
os.system("%staosdump -i ./taosdumptest/tmp4 -T 2 " % binPath)
tdSql.execute("use dp2")
tdSql.query("show stables")
tdSql.checkRows(2)
tdSql.query("show tables")
tdSql.checkRows(6)
tdSql.query("select count(*) from st2_0")
tdSql.error("use dp1")
tdSql.error("select count(*) from st1_0")
tdSql.error("select count(*) from gt3")
# tdSql.checkData(0, 0, 400)
tdSql.execute("drop database dp2")
# #check taosdumptest/tmp1
# tdSql.execute("drop database dp1")
# tdSql.execute("drop database dp2")
# os.system("%staosdump -i ./taosdumptest/tmp1 -T 2 " % binPath)
# tdSql.execute("use dp1")
# tdSql.query("show stables")
# tdSql.checkRows(1)
# tdSql.query("show tables")
# tdSql.checkRows(4)
# tdSql.execute("use dp2")
# tdSql.query("show stables")
# tdSql.checkRows(3)
# tdSql.query("show tables")
# tdSql.checkRows(9)
# tdSql.query("select c01 from gt0")
# tdSql.checkData(0,0,78.86155)
# tdSql.query("select c11 from gt1")
# tdSql.checkData(0, 0, 78.862020199)
# tdSql.query("select c21 from gt2")
# tdSql.checkData(0, 0, 78.86300)
# #check taosdumptest/tmp2
# tdSql.execute("drop database dp1")
# tdSql.execute("drop database dp2")
# os.system("%staosdump -i ./taosdumptest/tmp2 -T 2 " % binPath)
# tdSql.execute("use dp1")
# tdSql.query("show stables")
# tdSql.checkRows(1)
# tdSql.query("show tables")
# tdSql.checkRows(3)
# tdSql.error("use dp2")
# tdSql.query("select c01 from gt0")
# tdSql.checkData(0,0,78.86155)
# #check taosdumptest/tmp3
# tdSql.execute("drop database dp1")
# os.system("%staosdump -i ./taosdumptest/tmp3 -T 2 " % binPath)
# tdSql.execute("use dp2")
# tdSql.query("show stables")
# tdSql.checkRows(2)
# tdSql.query("show tables")
# tdSql.checkRows(4)
# tdSql.query("select count(*) from st1_0")
# tdSql.query("select c01 from gt0")
# tdSql.checkData(0,0,78.86155)
# tdSql.error("use dp1")
# tdSql.error("select count(*) from st2_0")
# tdSql.error("select count(*) from gt2")
# #check taosdumptest/tmp4
# tdSql.execute("drop database dp2")
# os.system("%staosdump -i ./taosdumptest/tmp4 -T 2 " % binPath)
# tdSql.execute("use dp2")
# tdSql.query("show stables")
# tdSql.checkRows(2)
# tdSql.query("show tables")
# tdSql.checkRows(6)
# tdSql.query("select c21 from gt2")
# tdSql.checkData(0, 0, 78.86300)
# tdSql.query("select count(*) from st2_0")
# tdSql.error("use dp1")
# tdSql.error("select count(*) from st1_0")
# tdSql.error("select count(*) from gt3")
# tdSql.execute("drop database dp2")
# os.system("rm -rf ./taosdumptest/tmp1")
# os.system("rm -rf ./taosdumptest/tmp2")
# os.system("rm -rf ./dump_result.txt")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册