-
Notifications
You must be signed in to change notification settings - Fork 15
/
credential-schema-test.ts
43 lines (36 loc) · 1.02 KB
/
credential-schema-test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { group } from 'k6';
import { Options } from 'k6/options';
import { Issuer } from '../../actors';
export let options: Options = {
scenarios: {
smoke: {
executor: 'constant-vus',
vus: 3,
duration: "1s",
},
},
thresholds: {
'http_req_duration{group:::Issuer creates credential schema}': ['max >= 0'],
'http_reqs{group:::Issuer creates credential schema}': ['count >= 0'],
'group_duration{group:::Issuer creates credential schema}': ['max >= 0'],
checks: ['rate==1'],
http_req_duration: ['p(95)<=100'],
},
};
export const issuer = new Issuer();
export function setup() {
group('Issuer publishes DID', function () {
issuer.createUnpublishedDid();
issuer.publishDid();
});
return {
issuerDid: issuer.did,
};
}
export default (data: { issuerDid: string; }) => {
// This is the only way to pass data from setup to default
issuer.did = data.issuerDid;
group('Issuer creates credential schema', function () {
issuer.createCredentialSchema();
});
};