Skip to content

Commit

Permalink
Fix/test del rot multisig more (#267)
Browse files Browse the repository at this point in the history
* testing delegation and deployed services

Signed-off-by: 2byrds <[email protected]>

* tested delegation endpoint

Signed-off-by: 2byrds <[email protected]>

* successful single and multisig delegation

Signed-off-by: 2byrds <[email protected]>

* fixed local test-setup run with latest keria

Signed-off-by: 2byrds <[email protected]>

* fixed salty log event ked/serder creation

Signed-off-by: 2byrds <[email protected]>

* with keripy multiplexor parser using local=True, getting to delegatee multisig member 2 failing on acceptMultisig exchange

Signed-off-by: 2byrds <[email protected]>

* small salty test fixes and updates del-multisig to notify

Signed-off-by: 2byrds <[email protected]>

* fixes for keripy/keria updates to exn w/ rp field

Signed-off-by: 2byrds <[email protected]>

* del multisig w/o witnesses success

Signed-off-by: 2byrds <[email protected]>

* added back witnesses for delegated multisig successful integration test

Signed-off-by: 2byrds <[email protected]>

* multisig-vlei-issuance successful integration test

Signed-off-by: 2byrds <[email protected]>

* updated digest in test per Serder changes

Signed-off-by: 2byrds <[email protected]>

* revert local test changes

Signed-off-by: 2byrds <[email protected]>

* remove comments, etc

Signed-off-by: 2byrds <[email protected]>

* small fix depending on env

Signed-off-by: 2byrds <[email protected]>

* prettier

Signed-off-by: 2byrds <[email protected]>

* making multisig methods available for other tests

Signed-off-by: 2byrds <[email protected]>

* fix docker digest

Signed-off-by: 2byrds <[email protected]>

* fix docker keria health check

Signed-off-by: 2byrds <[email protected]>

* prettier and audit fix

Signed-off-by: 2byrds <[email protected]>

* some test utility consolidation but a new issue should be created

Signed-off-by: 2byrds <[email protected]>

* prettier

Signed-off-by: 2byrds <[email protected]>

* fix syntax

Signed-off-by: 2byrds <[email protected]>

* prettier

Signed-off-by: 2byrds <[email protected]>

* Fix naming

* prettier

Signed-off-by: 2byrds <[email protected]>

* updated docker-compose.yaml with entrypoint override for keria

Signed-off-by: 2byrds <[email protected]>

* restoring original keria docker-compose version string

Signed-off-by: 2byrds <[email protected]>

* simplify admitSingleSig call

Signed-off-by: 2byrds <[email protected]>

* bump version to 0.3.0 to signal breaking change with previous 0.1.x keria versions

Signed-off-by: 2byrds <[email protected]>

* fixed ixn url

Signed-off-by: 2byrds <[email protected]>

* prettier

Signed-off-by: 2byrds <[email protected]>

* fix npm audit issue with mermaid-js with override

Signed-off-by: 2byrds <[email protected]>

* restore eslint, etc

Signed-off-by: 2byrds <[email protected]>

* using constants

Signed-off-by: 2byrds <[email protected]>

* revert package-lock.json to original with minimal audit fixes

Signed-off-by: 2byrds <[email protected]>

* specify the keria version

Signed-off-by: 2byrds <[email protected]>

* adding test coverage for delegation approval

Signed-off-by: 2byrds <[email protected]>

* unit test coverage for delegation approval

Signed-off-by: 2byrds <[email protected]>

* prettier

Signed-off-by: 2byrds <[email protected]>

* reverting to 127.0.0.1 oobis for test value in local mode

Signed-off-by: 2byrds <[email protected]>

* per review, delegating test - remove credential related code

Signed-off-by: 2byrds <[email protected]>

* per review, added check of body for delegation approval

Signed-off-by: 2byrds <[email protected]>

* per review, removing comments

Signed-off-by: 2byrds <[email protected]>

* per review, avoid testing changing id

Signed-off-by: 2byrds <[email protected]>

* per review, fixing warnings in delegation test

Signed-off-by: 2byrds <[email protected]>

* per review, consolidated waitAndMarkNotification functions

Signed-off-by: 2byrds <[email protected]>

* prettier

Signed-off-by: 2byrds <[email protected]>

* small fixes from checks

Signed-off-by: 2byrds <[email protected]>

---------

Signed-off-by: 2byrds <[email protected]>
  • Loading branch information
2byrds authored Jul 26, 2024
1 parent e7aaf3c commit 850af59
Show file tree
Hide file tree
Showing 32 changed files with 3,709 additions and 1,491 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
strategy:
matrix:
os: ['ubuntu-latest']
keria-version: ['0.1.3']
keria-version: ['0.2.0-dev3']
node-version: ['20']
env:
KERIA_IMAGE_TAG: ${{ matrix.keria-version }}
Expand Down
24 changes: 13 additions & 11 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,27 @@ services:
- 7723:7723

keria:
image: ${KERIA_IMAGE:-weboftrust/keria}:${KERIA_IMAGE_TAG:-0.1.3}
image: ${KERIA_IMAGE:-weboftrust/keria}:${KERIA_IMAGE_TAG:-0.2.0-dev3}
environment:
- KERI_AGENT_CORS=1
- KERI_URL=http://keria:3902
- PYTHONUNBUFFERED=1
- PYTHONIOENCODING=UTF-8
volumes:
- ./config/keria.json:/keria/config/keri/cf/keria.json
entrypoint: keria
command:
- start
- --config-dir
- /keria/config
- --config-file
- keria
- --name
- agent
entrypoint:
[
'keria',
'start',
'--config-dir',
'/keria/config',
'--config-file',
'keria',
'--name',
'agent',
]
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3902/spec.yaml']
test: ['CMD', 'wget', '--spider', 'http://keria:3902/spec.yaml']
interval: 2s
timeout: 3s
retries: 5
Expand Down
4 changes: 2 additions & 2 deletions examples/integration-scripts/challenge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('challenge', async () => {
client1,
await icpResult1.op()
);
let rpyResult1 = await client1
const rpyResult1 = await client1
.identifiers()
.addEndRole('alice', 'agent', client1!.agent!.pre);
await waitOperation(client1, await rpyResult1.op());
Expand All @@ -81,7 +81,7 @@ test('challenge', async () => {
client2,
await icpResult2.op()
);
let rpyResult2 = await client2
const rpyResult2 = await client2
.identifiers()
.addEndRole('bob', 'agent', client2!.agent!.pre);
await waitOperation(client2, await rpyResult2.op());
Expand Down
27 changes: 10 additions & 17 deletions examples/integration-scripts/credentials.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ import { resolveEnvironment } from './utils/resolve-env';
import {
assertNotifications,
assertOperations,
createAid,
getOrCreateClients,
getOrCreateContact,
markAndRemoveNotification,
resolveOobi,
waitForNotifications,
waitOperation,
} from './utils/test-util';
import { retry } from './utils/retry';
import {
getOrCreateClients,
getOrCreateContact,
getOrCreateIdentifier,
} from './utils/test-setup';
import { randomUUID } from 'crypto';
import { step } from './utils/test-step';

Expand All @@ -36,11 +34,6 @@ function createTimestamp() {
return new Date().toISOString().replace('Z', '000+00:00');
}

async function createAid(client: SignifyClient, name: string): Promise<Aid> {
const [prefix, oobi] = await getOrCreateIdentifier(client, name);
return { prefix, oobi, name };
}

let issuerClient: SignifyClient;
let holderClient: SignifyClient;
let verifierClient: SignifyClient;
Expand Down Expand Up @@ -125,7 +118,7 @@ test('single signature credentials', async () => {
.rename(issuerAid.name, registryName, updatedRegistryName);

registries = await issuerClient.registries().list(issuerAid.name);
let updateRegistry: { name: string; regk: string } = registries[0];
const updateRegistry: { name: string; regk: string } = registries[0];
assert.equal(registries.length, 1);
assert.equal(updateRegistry.name, updatedRegistryName);

Expand Down Expand Up @@ -243,7 +236,7 @@ test('single signature credentials', async () => {
datetime: dt,
});

let op = await issuerClient
const op = await issuerClient
.ipex()
.submitGrant(issuerAid.name, grant, gsigs, gend, [
holderAid.prefix,
Expand All @@ -266,7 +259,7 @@ test('single signature credentials', async () => {
grantNotification.a.d!,
createTimestamp()
);
let op = await holderClient
const op = await holderClient
.ipex()
.submitAdmit(holderAid.name, admit, sigs, aend, [issuerAid.prefix]);
await waitOperation(holderClient, op);
Expand Down Expand Up @@ -313,7 +306,7 @@ test('single signature credentials', async () => {
datetime: createTimestamp(),
});

let op = await holderClient
const op = await holderClient
.ipex()
.submitGrant(holderAid.name, grant2, gsigs2, gend2, [
verifierAid.prefix,
Expand All @@ -338,7 +331,7 @@ test('single signature credentials', async () => {
createTimestamp()
);

let op = await verifierClient
const op = await verifierClient
.ipex()
.submitAdmit(verifierAid.name, admit3, sigs3, aend3, [
holderAid.prefix,
Expand Down Expand Up @@ -437,7 +430,7 @@ test('single signature credentials', async () => {
datetime: dt,
});

let op = await holderClient
const op = await holderClient
.ipex()
.submitGrant(holderAid.name, grant, gsigs, gend, [
legalEntityAid.prefix,
Expand All @@ -461,7 +454,7 @@ test('single signature credentials', async () => {
createTimestamp()
);

let op = await legalEntityClient
const op = await legalEntityClient
.ipex()
.submitAdmit(legalEntityAid.name, admit, sigs, aend, [
holderAid.prefix,
Expand Down
Loading

0 comments on commit 850af59

Please sign in to comment.