Skip to content

Commit b73431f

Browse files
committed
add testcase for getAccountTables and getTableAuth
1 parent 13491cd commit b73431f

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

test/test.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,19 @@ main();
3535

3636
async function main(){
3737
try {
38-
await c.connect('ws://127.0.0.1:6007');
39-
//await c.connect('ws://192.168.0.16:6006');
38+
await c.connect('ws://127.0.0.1:6008');
4039

4140
console.log('连接成功')
4241

4342
c.as(owner);
4443

4544
// c.setRestrict(true);
4645
//激活user账户
47-
await activateAccount(user.address);
46+
// await activateAccount(user.address);
4847

4948
//await testSubscribe();
5049

51-
//await testRippleAPI();
50+
// await testRippleAPI();
5251
// await testAccount();
5352
// await testChainsql();
5453

@@ -153,6 +152,7 @@ async function testChainsql(){
153152
// await insertAfterGrant();
154153
// await testOperationRule();
155154
await testAccountTables();
155+
await testTableAuth();
156156

157157
//现在底层不允许直接删除所有记录这种操作了
158158
// await testDeleteAll();
@@ -368,7 +368,7 @@ async function testGetTransaction(){
368368
// let rs = await c.getTransaction('3E02AA296A348F10C1F54D2EF0CBBDA9A6D389F66EFFBA936F1842506FACD4EA');
369369
// console.log(rs);
370370

371-
c.getTransaction('3DD9408D358077015F3ED8D25F88D9EC0D8DA4B54047EF2A6E2DE8593F0B4F30',callback);
371+
c.getTransaction('B4FB648883D73D4EB2D3A9E6059F1D0CF97105445F06B763A9DAB9FA66AA2EFC',callback);
372372
// var rs = await callback2Promise(c.api.getTransaction,opt);
373373
// console.log(rs);
374374
}
@@ -432,11 +432,17 @@ function callback(err,data){
432432
}
433433
}
434434

435-
function testAccountTables()
435+
async function testAccountTables()
436436
{
437-
let retRequest = c.getAccountTables(owner.address,false)
437+
let retRequest = await c.getAccountTables(owner.address,true)
438438
console.log(retRequest)
439439
}
440+
441+
async function testTableAuth(){
442+
let retRequest = await c.getTableAuth(owner.address,"D13");
443+
console.log(retRequest)
444+
}
445+
440446
async function testDateTime()
441447
{
442448
//var account = await generateAccount();

0 commit comments

Comments
 (0)