@@ -19,6 +19,10 @@ const assertion = <Assertion>{
1919 A10 : [ 10 ] ,
2020 A11 : [ 10 ] ,
2121} ;
22+
23+
24+ // it doesn't make much difference test A1 only vs test A1 - A11, one VC type is enough.
25+ //So only use A1 to trigger the wrong event
2226describeLitentry ( 'VC test' , async ( context ) => {
2327 const aesKey = '0x22fc82db5b606998ad45099b7978b5b4f9dd4ea6017e57370ac56141caaabd12' ;
2428 var indexList : HexString [ ] = [ ] ;
@@ -60,14 +64,15 @@ describeLitentry('VC test', async (context) => {
6064 indexList . push ( res [ k ] . index ) ;
6165 }
6266 } ) ;
63- step ( 'Request Error VC' , async ( ) => {
67+ step ( 'Request Error VC(A1) ' , async ( ) => {
6468 const resp_request_error = ( await requestErrorVCs (
6569 context ,
6670 context . defaultSigner [ 1 ] ,
6771 aesKey ,
6872 true ,
6973 context . mrEnclave ,
70- assertion
74+ assertion ,
75+ [ 'A1' ]
7176 ) ) as Event [ ] ;
7277
7378 await checkFailReason ( resp_request_error , 'User shielding key is missing' , true ) ;
@@ -80,13 +85,14 @@ describeLitentry('VC test', async (context) => {
8085 assert . equal ( registry . toHuman ( ) ! [ 'status' ] , 'Disabled' ) ;
8186 }
8287 } ) ;
83- step ( 'Disable error VC' , async ( ) => {
84- //Alice has already disabled the VC
88+ step ( 'Disable error VC(A1) ' , async ( ) => {
89+ //Alice has already disabled the A1 VC
8590 const resp_disable_error = ( await disableErrorVCs (
8691 context ,
8792 context . defaultSigner [ 0 ] ,
8893 true ,
89- indexList
94+
95+ [ indexList [ 0 ] ]
9096 ) ) as HexString [ ] ;
9197 await checkFailReason ( resp_disable_error , 'vcManagement.VCAlreadyDisabled' , false ) ;
9298 } ) ;
@@ -100,14 +106,11 @@ describeLitentry('VC test', async (context) => {
100106 }
101107 } ) ;
102108
103- step ( 'Revoke Error VC' , async ( ) => {
104- //Alice has already revoked the VC
105- const resp_revoke_error = ( await revokeErrorVCs (
106- context ,
107- context . defaultSigner [ 0 ] ,
108- true ,
109- indexList
110- ) ) as string [ ] ;
109+ step ( 'Revoke Error VC(A1)' , async ( ) => {
110+ //Alice has already revoked the A1 VC
111+ const resp_revoke_error = ( await revokeErrorVCs ( context , context . defaultSigner [ 0 ] , true , [
112+ indexList [ 0 ] ,
113+ ] ) ) as string [ ] ;
111114 await checkFailReason ( resp_revoke_error , 'vcManagement.VCNotExist' , false ) ;
112115 } ) ;
113116} ) ;
0 commit comments