test: test case for show grants full

This commit is contained in:
kailixu 2024-05-10 17:25:33 +08:00
parent 41eb82c4de
commit 7418711878
1 changed files with 16 additions and 9 deletions

View File

@ -269,13 +269,17 @@ class TDTestCase:
def ins_grants_check(self): def ins_grants_check(self):
grant_name_dict = { grant_name_dict = {
'stream':'stream', 'stream':'Stream',
'subscription':'subscription', 'subscription':'Subscription',
'view':'view', 'view':'View',
'audit':'audit', 'audit':'Audit',
'csv':'csv', 'csv':'CSV',
'storage':'multi_tier_storage', 'storage':'Multi-Tier Storage',
'backup_restore':'backup_restore', 'backup_restore':'Data Backup & Restore',
'object_storage':'Object Storage',
'active_active':'Active-Active',
'dual_replica':'Dual-Replica HA',
'db_encryption':'Database Encryption',
'opc_da':'OPC_DA', 'opc_da':'OPC_DA',
'opc_ua':'OPC_UA', 'opc_ua':'OPC_UA',
'pi':'Pi', 'pi':'Pi',
@ -285,7 +289,10 @@ class TDTestCase:
'avevahistorian':'avevaHistorian', 'avevahistorian':'avevaHistorian',
'opentsdb':'OpenTSDB', 'opentsdb':'OpenTSDB',
'td2.6':'TDengine2.6', 'td2.6':'TDengine2.6',
'td3.0':'TDengine3.0' 'td3.0':'TDengine3.0',
'mysql':'MySQL',
'postgres':'PostgreSQL',
'oracle':'Oracle',
} }
tdSql.execute('drop database if exists db2') tdSql.execute('drop database if exists db2')
@ -297,7 +304,7 @@ class TDTestCase:
if result[i][0] in grant_name_dict: if result[i][0] in grant_name_dict:
tdSql.checkEqual(result[i][1], grant_name_dict[result[i][0]]) tdSql.checkEqual(result[i][1], grant_name_dict[result[i][0]])
index += 1 index += 1
tdSql.checkEqual(index, 17) tdSql.checkEqual(index, 24)
tdSql.query(f'select * from information_schema.ins_grants_logs') tdSql.query(f'select * from information_schema.ins_grants_logs')
result = tdSql.queryResult result = tdSql.queryResult
tdSql.checkEqual(True, len(result) >= 0) tdSql.checkEqual(True, len(result) >= 0)