Skip to content

Commit

Permalink
test: add restriction
Browse files Browse the repository at this point in the history
Signed-off-by: Allain Magyar <[email protected]>
  • Loading branch information
amagyar-iohk committed Mar 29, 2024
1 parent c006996 commit 09cee07
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
19 changes: 13 additions & 6 deletions E2E/e2eTests/Source/Abilities/OpenEnterpriseAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ class OpenEnterpriseAPI: Ability {
"issuerId": issuerId,
"attrNames": [
"name",
"age"
"age",
"gender"
]
]

Expand Down Expand Up @@ -244,7 +245,7 @@ class OpenEnterpriseAPI: Ability {
author: issuerId,
schemaId: "\(Config.agentUrl)/schema-registry/schemas/\(anoncredSchemaGuid)/schema",
signatureType: "CL",
supportRevocation: true
supportRevocation: false
)

let response = try await client!.createCredentialDefinition(body: .json(anoncredDefinition))
Expand Down Expand Up @@ -331,7 +332,8 @@ class OpenEnterpriseAPI: Ability {
var claims: OpenAPIValueContainer = try OpenAPIValueContainer()
claims.value = [
"name" : "automation",
"age" : "99"
"age" : "99",
"gender": "M"
]

let body = Components.Schemas.CreateIssueCredentialRecordRequest(
Expand Down Expand Up @@ -403,9 +405,14 @@ class OpenEnterpriseAPI: Ability {
let credentialDefinitionUrl = Config.agentUrl + "/credential-definition-registry/definitions/" + Config.anoncredDefinitionGuid + "/definition"
let anoncredPresentationRequest = Components.Schemas.AnoncredPresentationRequestV1(
requested_attributes: .init(additionalProperties: [
"name": .init(
name: "name",
restrictions: []
"gender": .init(
name: "gender",
restrictions: [
.init(additionalProperties: [
"attr::gender::value": "M",
"cred_def_id": credentialDefinitionUrl
])
]
)
]),
requested_predicates: .init(additionalProperties: [
Expand Down
4 changes: 0 additions & 4 deletions E2E/e2eTests/TestFramework/Screenplay/Wait.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,3 @@ class Wait {
}
}
}

enum TimeoutError: Error {
case timeoutReached
}

0 comments on commit 09cee07

Please sign in to comment.