[test: add test case]

This commit is contained in:
plum-lihui 2022-04-26 19:57:54 +08:00
parent 84b19fbea2
commit 6c6b0055fb
3 changed files with 32 additions and 2 deletions

View File

@ -13,6 +13,7 @@
./test.sh -f tsim/db/basic6.sim
./test.sh -f tsim/db/basic7.sim
./test.sh -f tsim/db/error1.sim
./test.sh -f tsim/db/taosdlog.sim
# ---- dnode
./test.sh -f tsim/dnode/basic1.sim

View File

@ -0,0 +1,31 @@
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system rm -rf ../../sim/dnode1/log
system sh/exec.sh -n dnode1 -s start
sql connect
print =============== create database
sql create database d1 vgroups 2
sql show databases
if $rows != 3 then
return -1
endi
print =============== restart
system sh/exec.sh -n dnode1 -s stop -x SIGKILL
sleep 2000
system rm -rf ../../sim/dnode1/log
system sh/exec.sh -n dnode1 -s start
sleep 2000
print =============== show databases
sql create database d2 vgroups 6
sql show databases
if $rows != 4 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT

View File

@ -1,8 +1,6 @@
#!/bin/bash
set -e
python3 ./test.py -f 0-others/taosdlog.py
#python3 ./test.py -f 2-query/between.py
#python3 ./test.py -f 2-query/distinct.py
python3 ./test.py -f 2-query/varchar.py