Skip to content

Commit

Permalink
remove comments, etc
Browse files Browse the repository at this point in the history
Signed-off-by: 2byrds <[email protected]>
  • Loading branch information
2byrds committed Jun 14, 2024
1 parent 2c889ea commit 619e76b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 57 deletions.
38 changes: 2 additions & 36 deletions examples/integration-scripts/utils/resolve-env.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type TestEnvironmentPreset = 'local' | 'docker' | 'rootsid1' | 'rootsid2';
export type TestEnvironmentPreset = 'local' | 'docker';

export interface TestEnvironment {
preset: TestEnvironmentPreset;
Expand All @@ -13,16 +13,10 @@ const WAN = 'BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha';
const WIL = 'BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM';
const WES = 'BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX';

// rootsid witnesses
const W1 = 'BHI7yViNOGWd1X0aKMgxLm4dUgbQDYoCFSJM2U8Hb3cx'
const W2 = 'BOUZ4v-vPMP5KyZQP-d_8B30UHI4KWgXczBgWcRJnnYd'
const W3 = 'BNY3LWk2BzX8wXmkXuvpYRVSdfynanwKQwD80KOG00VH'


export function resolveEnvironment(
input?: TestEnvironmentPreset
): TestEnvironment {
const preset = input ?? process.env.TEST_ENVIRONMENT ?? 'local';
const preset = input ?? process.env.TEST_ENVIRONMENT ?? 'docker';

const url = 'http://127.0.0.1:3901';
const bootUrl = 'http://127.0.0.1:3903';
Expand Down Expand Up @@ -54,34 +48,6 @@ export function resolveEnvironment(
],
witnessIds: [WAN, WIL, WES],
};
case 'rootsid1':
return {
preset: preset,
// url: "http://keria--publi-7wqhypzd56ee-cc3c56cbeced4f45.elb.us-east-1.amazonaws.com/admin",
// bootUrl: "http://keria--publi-7wqhypzd56ee-cc3c56cbeced4f45.elb.us-east-1.amazonaws.com:3903",
url: "https://keria-dev.rootsid.cloud/admin",
bootUrl: "https://keria-dev.rootsid.cloud",
witnessUrls: [
"https://witness-dev01.rootsid.cloud",
"https://witness-dev02.rootsid.cloud",
"https://witness-dev03.rootsid.cloud"
],
witnessIds: [WAN, WIL, WES],
vleiServerUrl: 'http://schemas.rootsid.cloud',
};
case 'rootsid2':
return {
preset: preset,
url: "https://keria-demoservice.rootsid.cloud/admin",
bootUrl: "https://keria-demoservice.rootsid.cloud",
witnessUrls: [
"https://witness-dev01.rootsid.cloud",
"https://witness-dev02.rootsid.cloud",
"https://witness-dev03.rootsid.cloud"
],
witnessIds: [WAN, WIL, WES],
vleiServerUrl: 'http://schemas.rootsid.cloud',
};
default:
throw new Error(`Unknown test environment preset '${preset}'`);
}
Expand Down
21 changes: 0 additions & 21 deletions examples/integration-scripts/utils/test-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ import {
} from 'signify-ts';
import { resolveEnvironment } from './resolve-env';
import { waitOperation } from './test-util';
// import { retry } from './retry';
// import assert from 'assert';

// const RETRY_DEFAULTS = {
// maxSleep: 10000,
// minSleep: 1000,
// maxRetries: 10,
// timeout: 30000,
// };

/**
* Connect or boot a number of SignifyClient instances
Expand Down Expand Up @@ -115,17 +106,9 @@ export async function getOrCreateIdentifier(
console.log("identifiers.addEndRole", op);
}

// const result = await retry(async () => {
const oobi = await client.oobis().get(name, 'agent');
// if (oobi.oobis.length == 0) {
// console.log("Agent oobi not found, retrying...")
// throw new Error(`No agent oobi found for controller: ${name}`);
// }
const result: [string, string] = [id, oobi.oobis[0]];
console.log(name, result);
// return result;
// },RETRY_DEFAULTS);
// assert.equal(result[0], id);
return result;
}

Expand Down Expand Up @@ -191,9 +174,5 @@ export async function getOrCreateContact(
}
let op = await client.oobis().resolve(oobi, name);
op = await waitOperation(client, op);
// console.dir(op, { depth: 100 });
// const id = op.response.i;

// await client.contacts().get(id);
return op.response.i;
}

0 comments on commit 619e76b

Please sign in to comment.