Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vmidyllic committed Feb 22, 2024
1 parent 1681ef6 commit dcb23d1
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions pubsignals/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,9 +598,10 @@ func TestCheckRequest_Error(t *testing.T) {
},
},
pubSig: &CircuitOutputs{
IssuerID: &issuerID,
ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")),
Timestamp: now,
IssuerID: &issuerID,
ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")),
Timestamp: now,
IsRevocationChecked: 1,
},
expErr: errors.New("multiple requests not supported"),
loader: &mockJSONLDSchemaLoader{
Expand All @@ -620,9 +621,10 @@ func TestCheckRequest_Error(t *testing.T) {
},
},
pubSig: &CircuitOutputs{
IssuerID: &issuerID,
ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")),
Timestamp: now,
IssuerID: &issuerID,
ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")),
Timestamp: now,
IsRevocationChecked: 1,
},
expErr: errors.New("failed cast type map[string]interface"),
loader: &mockJSONLDSchemaLoader{
Expand All @@ -645,9 +647,10 @@ func TestCheckRequest_Error(t *testing.T) {
},
},
pubSig: &CircuitOutputs{
IssuerID: &issuerID,
ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")),
Timestamp: now,
IssuerID: &issuerID,
ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")),
Timestamp: now,
IsRevocationChecked: 1,
},
expErr: errors.New("multiple requests not supported"),
loader: &mockJSONLDSchemaLoader{
Expand All @@ -669,10 +672,11 @@ func TestCheckRequest_Error(t *testing.T) {
},
},
pubSig: &CircuitOutputs{
IssuerID: &issuerID,
ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")),
Operator: 3,
Timestamp: now,
IssuerID: &issuerID,
ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")),
Operator: 3,
Timestamp: now,
IsRevocationChecked: 1,
},
expErr: ErrRequestOperator,
loader: &mockJSONLDSchemaLoader{
Expand All @@ -694,11 +698,12 @@ func TestCheckRequest_Error(t *testing.T) {
},
},
pubSig: &CircuitOutputs{
IssuerID: &issuerID,
ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")),
Operator: 5,
Value: []*big.Int{big.NewInt(40)},
Timestamp: now,
IssuerID: &issuerID,
ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")),
Operator: 5,
Value: []*big.Int{big.NewInt(40)},
Timestamp: now,
IsRevocationChecked: 1,
},
expErr: ErrInvalidValues,
loader: &mockJSONLDSchemaLoader{
Expand Down Expand Up @@ -792,7 +797,7 @@ func TestCheckRequest_Error(t *testing.T) {
Value: []*big.Int{big.NewInt(20)},
Merklized: 0,
SlotIndex: 0,
IsRevocationChecked: 0,
IsRevocationChecked: 1,
Timestamp: now,
},
expErr: errors.New("invalid operation '$lt' for field type 'http://www.w3.org/2001/XMLSchema#boolean'"),
Expand Down Expand Up @@ -825,7 +830,7 @@ func TestCheckRequest_Error(t *testing.T) {
}(),
Merklized: 0,
SlotIndex: 0,
IsRevocationChecked: 0,
IsRevocationChecked: 1,
Timestamp: now,
},
expErr: ErrNegativeValue,
Expand Down

0 comments on commit dcb23d1

Please sign in to comment.