From 1b1a01fd46e7ed800dd9146c9a659969ace6250c Mon Sep 17 00:00:00 2001 From: bryanchang0603 Date: Thu, 10 Jun 2021 11:09:13 +0800 Subject: [PATCH] [TD-4658] adding community test case --- tests/pytest/alter/alter_keep.py | 53 ++++++++++++-------------------- 1 file changed, 19 insertions(+), 34 deletions(-) diff --git a/tests/pytest/alter/alter_keep.py b/tests/pytest/alter/alter_keep.py index 9d5db9c2ad..1b15b009d9 100644 --- a/tests/pytest/alter/alter_keep.py +++ b/tests/pytest/alter/alter_keep.py @@ -23,48 +23,33 @@ class TDTestCase: tdSql.init(conn.cursor(), logSql) def alterKeepCommunity(self): - ## community accepts both 1 paramater, 2 parmaters and 3 paramaters - ## but paramaters other than paramater 1 will be ignored - ## only paramater 1 will be used - tdSql.query('show databases') - tdSql.checkData(0,7,'3650,3650,3650') - - tdSql.execute('alter database db keep 10') - tdSql.query('show databases') - tdSql.checkData(0,7,'10,10,10') - - tdSql.execute('alter database db keep 50') - tdSql.query('show databases') - tdSql.checkData(0,7,'50,50,50') - - tdSql.execute('alter database db keep 20') - tdSql.query('show databases') - tdSql.checkData(0,7,'20,20,20') - - tdSql.execute('alter database db keep 100, 98 ,99') - tdSql.query('show databases') - tdSql.checkData(0,7,'100,100,100') - - tdSql.execute('alter database db keep 99, 100 ,101') + tdLog.notice('running Keep Keep Test, Community Version') + #testing keep parameter during create tdSql.query('show databases') - tdSql.checkData(0,7,'99,99,99') + tdSql.checkData(0,7,'3650') + tdSql.execute('drop database db') - tdSql.execute('alter database db keep 200, 199 ,198') + tdSql.execute('create database db keep 100') tdSql.query('show databases') - tdSql.checkData(0,7,'200,200,200') + tdSql.checkData(0,7,'100') + tdSql.execute('drop database db') - tdSql.execute('alter database db keep 4000,4001') - tdSql.query('show databases') - tdSql.checkData(0,7,'4000,4000,4000') + tdSql.error('create database db keep ') + tdSql.error('create database db keep 10,20') + tdSql.error('create database db keep 10,20') + tdSql.error('create database db keep 20,30,40,50') - tdSql.execute('alter database db keep 5000,50') - tdSql.query('show databases') - tdSql.checkData(0,7,'5000,5000,5000') + #testing keep parameter during alter + tdSql.execute('create database db') - tdSql.execute('alter database db keep 50,5000') + tdSql.execute('alter database db keep 100') tdSql.query('show databases') - tdSql.checkData(0,7,'50,50,50') + tdSql.checkData(0,7,'100') + tdSql.error('alter database db keep ') + tdSql.error('alter database db keep 10,20') + tdSql.error('alter database db keep 10,20') + tdSql.error('alter database db keep 20,30,40,50') def alterKeepEnterprise(self): tdLog.notice('running Keep Keep Test, Enterprise Version') -- GitLab