Skip to content

Commit

Permalink
Merge branch 'main' into update-docs-make-consistence
Browse files Browse the repository at this point in the history
Signed-off-by: Yurii Shynbuiev - IOHK <yurii.shynbuiev@iohk.io>
  • Loading branch information
yshyn-iohk committed Jun 21, 2024
2 parents 59a3450 + 3cb59d1 commit b5ce8e6
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.junit.runner.RunWith
features = ["src/test/resources/features"],
snippets = CucumberOptions.SnippetType.CAMELCASE,
plugin = ["pretty"],
tags = "not @flaky",
)
@RunWith(CucumberWithSerenity::class)
class IntegrationTestsRunner
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
@proof @jwt
Feature: Present Proof Protocol

Scenario: Holder presents credential proof to verifier
Given Verifier and Holder have an existing connection
And Holder has an issued credential from Issuer
When Verifier sends a request for proof presentation to Holder
And Holder receives the request
And Holder makes the presentation of the proof to Verifier
# Then Verifier has the proof verified
@flaky
Scenario: Holder presents credential proof to verifier
Given Verifier and Holder have an existing connection
And Holder has an issued credential from Issuer
When Verifier sends a request for proof presentation to Holder
And Holder receives the request
And Holder makes the presentation of the proof to Verifier
Then Verifier has the proof verified

Scenario: Verifier rejects holder proof
Given Verifier and Holder have an existing connection
And Holder has an issued credential from Issuer
When Verifier sends a request for proof presentation to Holder
And Holder receives the request
And Holder rejects the proof
Then Holder sees the proof is rejected
Scenario: Verifier rejects holder proof
Given Verifier and Holder have an existing connection
And Holder has an issued credential from Issuer
When Verifier sends a request for proof presentation to Holder
And Holder receives the request
And Holder rejects the proof
Then Holder sees the proof is rejected

Scenario: Holder presents proof to verifier which is the issuer itself
Given Issuer and Holder have an existing connection
And Holder has an issued credential from Issuer
When Issuer sends a request for proof presentation to Holder
And Holder receives the request
And Holder makes the presentation of the proof to Issuer
Then Issuer has the proof verified
@flaky
Scenario: Holder presents proof to verifier which is the issuer itself
Given Issuer and Holder have an existing connection
And Holder has an issued credential from Issuer
When Issuer sends a request for proof presentation to Holder
And Holder receives the request
And Holder makes the presentation of the proof to Issuer
Then Issuer has the proof verified
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@revocation @jwt
@revocation @jwt @flaky
Feature: Credential revocation - JWT

Background:
Expand Down
2 changes: 1 addition & 1 deletion tests/performance-tests/agent-performance-tests-k6/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
AGENT_VERSION=1.33.0-SNAPSHOT
AGENT_VERSION=1.36.1-SNAPSHOT
PRISM_NODE_VERSION=2.3.0
VAULT_DEV_ROOT_TOKEN_ID=root
Original file line number Diff line number Diff line change
@@ -1,85 +1,86 @@
import { Options } from "k6/options";
import { Issuer, Holder, Verifier } from "../../actors";
import { CredentialSchemaResponse } from "@input-output-hk/prism-typescript-client";
import { defaultOptions } from "../../scenarios/default";
import merge from "ts-deepmerge";
import { describe } from "../../k6chaijs.js";
import { Options } from 'k6/options'
import { Issuer, Holder, Verifier } from '../../actors'
import { CredentialSchemaResponse } from '@input-output-hk/prism-typescript-client'
import { defaultOptions } from '../../scenarios/default'
import merge from 'ts-deepmerge'
import { describe } from '../../k6chaijs.js'

export const localOptions: Options = {
thresholds: {
"group_duration{group:::Holder connects with Issuer}": ["avg < 10000"],
"group_duration{group:::Issuer creates credential offer for Holder}": [
"avg < 10000",
'group_duration{group:::Holder connects with Issuer}': ['avg < 10000'],
'group_duration{group:::Issuer creates credential offer for Holder}': [
'avg < 10000'
],
"group_duration{group:::Holder connects with Verifier}": ["avg < 10000"],
"group_duration{group:::Verifier requests proof from Holder}": [
"avg < 10000",
],
},
};
export let options: Options = merge(localOptions, defaultOptions);
'group_duration{group:::Holder connects with Verifier}': ['avg < 10000'],
'group_duration{group:::Verifier requests proof from Holder}': [
'avg < 10000'
]
}
}
export const options: Options = merge(localOptions, defaultOptions)

const issuer = new Issuer();
const holder = new Holder();
const verifier = new Verifier();
const issuer = new Issuer()
const holder = new Holder()
const verifier = new Verifier()

export function setup() {
describe("Issuer publishes DID", function () {
issuer.createUnpublishedDid();
issuer.publishDid();
});
export function setup () {
describe('Issuer publishes DID', function () {
issuer.createUnpublishedDid()
issuer.publishDid()
})

describe("Issuer creates credential schema", function () {
issuer.createCredentialSchema();
});
describe('Issuer creates credential schema', function () {
issuer.createCredentialSchema()
})

describe("Holder creates unpublished DID", function () {
holder.createUnpublishedDid();
});
describe('Holder creates unpublished DID', function () {
holder.createUnpublishedDid()
})

return {
issuerDid: issuer.did,
holderDid: holder.did,
issuerSchema: issuer.schema,
};
issuerSchema: issuer.schema
}
}

export default (data: {
issuerDid: string;
holderDid: string;
issuerSchema: CredentialSchemaResponse;
}) => {
issuer.did = data.issuerDid;
issuer.schema = data.issuerSchema;
holder.did = data.holderDid;
issuer.did = data.issuerDid
issuer.schema = data.issuerSchema
holder.did = data.holderDid

describe("Holder connects with Issuer", function () {
issuer.createHolderConnection();
holder.acceptIssuerConnection(issuer.connectionWithHolder!.invitation);
issuer.finalizeConnectionWithHolder();
holder.finalizeConnectionWithIssuer();
describe('Holder connects with Issuer', function () {
issuer.createHolderConnection()
holder.acceptIssuerConnection(issuer.connectionWithHolder!.invitation)
issuer.finalizeConnectionWithHolder()
holder.finalizeConnectionWithIssuer()
}) &&

describe("Issuer creates credential offer for Holder", function () {
issuer.createCredentialOffer();
issuer.waitForCredentialOfferToBeSent();
holder.waitAndAcceptCredentialOffer(issuer.credential!.thid);
issuer.receiveCredentialRequest();
issuer.issueCredential();
issuer.waitForCredentialToBeSent();
holder.receiveCredential();
describe('Issuer creates credential offer for Holder', function () {
issuer.createCredentialOffer()
issuer.waitForCredentialOfferToBeSent()
holder.waitAndAcceptCredentialOffer(issuer.credential!.thid)
issuer.receiveCredentialRequest()
issuer.issueCredential()
issuer.waitForCredentialToBeSent()
holder.receiveCredential()
}) &&

describe("Holder connects with Verifier", function () {
verifier.createHolderConnection();
holder.acceptVerifierConnection(verifier.connectionWithHolder!.invitation);
verifier.finalizeConnectionWithHolder();
holder.finalizeConnectionWithVerifier();
}) &&

describe("Verifier requests proof from Holder", function () {
verifier.requestProof();
holder.waitAndAcceptProofRequest(verifier.presentation!.thid);
verifier.acknowledgeProof();
});
};
describe('Holder connects with Verifier', function () {
verifier.createHolderConnection()
holder.acceptVerifierConnection(verifier.connectionWithHolder!.invitation)
verifier.finalizeConnectionWithHolder()
holder.finalizeConnectionWithVerifier()
})
// &&
//
// describe("Verifier requests proof from Holder", function () {
// verifier.requestProof();
// holder.waitAndAcceptProofRequest(verifier.presentation!.thid);
// verifier.acknowledgeProof();
// });
}

0 comments on commit b5ce8e6

Please sign in to comment.