add test
This commit is contained in:
parent
ed1267a0d7
commit
2c988d9f80
|
@ -0,0 +1,32 @@
|
|||
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 =============== step2
|
||||
sql create database db
|
||||
sql show create database db
|
||||
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print =============== step3
|
||||
sql use db
|
||||
sql show create database db
|
||||
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != db then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql drop database db
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
|
@ -0,0 +1,87 @@
|
|||
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 ===============create three type table
|
||||
sql create database db
|
||||
sql use db
|
||||
sql create table meters(ts timestamp, f binary(8)) tags(loc int, zone binary(8))
|
||||
sql create table t0 using meters tags(1,'ch')
|
||||
sql create table normalTbl(ts timestamp, zone binary(8))
|
||||
|
||||
sql use db
|
||||
sql show create table meters
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print ===============check sub table
|
||||
sql show create table t0
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 == 't0' then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print ===============check normal table
|
||||
|
||||
sql show create table normalTbl
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 == 'normalTbl' then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print ===============check super table
|
||||
sql show create table meters
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 == 'meters' then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print ===============check sub table with prefix
|
||||
|
||||
sql show create table db.t0
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 == 't0' then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print ===============check normal table with prefix
|
||||
sql show create table db.normalTbl
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 == 'normalTbl' then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
||||
print ===============check super table with prefix
|
||||
sql show create table db.meters
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 == 'meters' then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql drop database db
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
Loading…
Reference in New Issue