From 922736fed53b69a7a449db33f09229feadf9211e Mon Sep 17 00:00:00 2001 From: dapan <89396746@qq.com> Date: Wed, 9 Jun 2021 15:29:10 +0800 Subject: [PATCH] fix case issue --- tests/pytest/alter/alter_keep.py | 12 ++++++------ tests/script/general/db/alter_option.sim | 10 +++++----- tests/script/general/http/restful_full.sim | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/pytest/alter/alter_keep.py b/tests/pytest/alter/alter_keep.py index cb630963a7..f73b8ce460 100644 --- a/tests/pytest/alter/alter_keep.py +++ b/tests/pytest/alter/alter_keep.py @@ -72,9 +72,9 @@ class TDTestCase: tdSql.query('show databases') tdSql.checkData(0,7,'3650,3650,3650') - tdSql.error('alter database db keep 10') + tdSql.execute('alter database db keep 10') tdSql.query('show databases') - tdSql.checkData(0,7,'3650,3650,3650') + tdSql.checkData(0,7,'10,10,10') ## the order for altering keep is keep(D), keep0, keep1. ## if the order is changed, please modify the following test @@ -84,17 +84,17 @@ class TDTestCase: tdSql.query('show databases') tdSql.checkData(0,7,'10,10,10') - tdSql.execute('alter database db keep 100, 98 ,99') + tdSql.error('alter database db keep 100, 98 ,99') tdSql.query('show databases') - tdSql.checkData(0,7,'98,99,100') + tdSql.checkData(0,7,'10,10,10') tdSql.execute('alter database db keep 200, 200 ,200') tdSql.query('show databases') tdSql.checkData(0,7,'200,200,200') - tdSql.error('alter database db keep 198, 199 ,200') + tdSql.execute('alter database db keep 198, 199 ,200') tdSql.query('show databases') - tdSql.checkData(0,7,'200,200,200') + tdSql.checkData(0,7,'198,199,200') # tdSql.execute('alter database db keep 3650,3650,3650') # tdSql.error('alter database db keep 4000,3640') diff --git a/tests/script/general/db/alter_option.sim b/tests/script/general/db/alter_option.sim index bd68ddd859..c20a96fd1b 100644 --- a/tests/script/general/db/alter_option.sim +++ b/tests/script/general/db/alter_option.sim @@ -112,21 +112,21 @@ endi sql alter database db keep 30 sql show databases print keep $data7_db -if $data7_db != 20,20,30 then +if $data7_db != 30,30,30 then return -1 endi sql alter database db keep 40 sql show databases print keep $data7_db -if $data7_db != 20,20,40 then +if $data7_db != 40,40,40 then return -1 endi -sql alter database db keep 40 -sql alter database db keep 30 +sql alter database db keep 40,50 +sql alter database db keep 30,31 sql alter database db keep 20 -sql_error alter database db keep 10 +sql_error alter database db keep 10.0 sql_error alter database db keep 9 sql_error alter database db keep 1 sql_error alter database db keep 0 diff --git a/tests/script/general/http/restful_full.sim b/tests/script/general/http/restful_full.sim index 8094a943f5..a5d3ac2b86 100644 --- a/tests/script/general/http/restful_full.sim +++ b/tests/script/general/http/restful_full.sim @@ -88,7 +88,7 @@ print =============== step2 - no db #11 system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'show databases' 127.0.0.1:7111/rest/sql print 11-> $system_content -if $system_content != @{"status":"succ","head":["name","created_time","ntables","vgroups","replica","quorum","days","keep0,keep1,keep(D)","cache(MB)","blocks","minrows","maxrows","wallevel","fsync","comp","cachelast","precision","update","status"],"column_meta":[["name",8,32],["created_time",9,8],["ntables",4,4],["vgroups",4,4],["replica",3,2],["quorum",3,2],["days",3,2],["keep0,keep1,keep(D)",8,24],["cache(MB)",4,4],["blocks",4,4],["minrows",4,4],["maxrows",4,4],["wallevel",2,1],["fsync",4,4],["comp",2,1],["cachelast",2,1],["precision",8,3],["update",2,1],["status",8,10]],"data":[],"rows":0}@ then +if $system_content != @{"status":"succ","head":["name","created_time","ntables","vgroups","replica","quorum","days","keep0,keep1,keep2","cache(MB)","blocks","minrows","maxrows","wallevel","fsync","comp","cachelast","precision","update","status"],"column_meta":[["name",8,32],["created_time",9,8],["ntables",4,4],["vgroups",4,4],["replica",3,2],["quorum",3,2],["days",3,2],["keep0,keep1,keep2",8,24],["cache(MB)",4,4],["blocks",4,4],["minrows",4,4],["maxrows",4,4],["wallevel",2,1],["fsync",4,4],["comp",2,1],["cachelast",2,1],["precision",8,3],["update",2,1],["status",8,10]],"data":[],"rows":0}@ then return -1 endi -- GitLab