From 55fb0ac9da05a64fb75502afd52f062bea5ee226 Mon Sep 17 00:00:00 2001 From: Verin1005 Date: Thu, 19 Dec 2024 09:05:26 +0000 Subject: [PATCH 1/2] fix script --- tee-worker/identity/ts-tests/post-checks/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tee-worker/identity/ts-tests/post-checks/package.json b/tee-worker/identity/ts-tests/post-checks/package.json index a4ae5f4326..deb3d4eb37 100644 --- a/tee-worker/identity/ts-tests/post-checks/package.json +++ b/tee-worker/identity/ts-tests/post-checks/package.json @@ -5,7 +5,7 @@ "type": "module", "main": "index.js", "scripts": { - "start": "LITENTRY_NETWORK='litentry-dev' mocha --timeout 20000 --exit --sort -r ts-node/register --loader=ts-node/esm ./tests/**/*.test.ts" + "start": "LITENTRY_NETWORK=${LITENTRY_NETWORK:-litentry-dev} mocha --timeout 20000 --exit --sort -r ts-node/register --loader=ts-node/esm ./tests/**/*.test.ts" }, "dependencies": { "@litentry/chaindata": "^0.2.0", From 7d2fd7b59c27f18a4f0079ae8419289c3e1918db Mon Sep 17 00:00:00 2001 From: Verin1005 Date: Thu, 19 Dec 2024 09:05:35 +0000 Subject: [PATCH 2/2] change network --- tee-worker/identity/ts-tests/post-checks/config.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tee-worker/identity/ts-tests/post-checks/config.ts b/tee-worker/identity/ts-tests/post-checks/config.ts index 4829843cff..bff9a52f09 100644 --- a/tee-worker/identity/ts-tests/post-checks/config.ts +++ b/tee-worker/identity/ts-tests/post-checks/config.ts @@ -1,7 +1,8 @@ -import { byId } from '@litentry/chaindata'; +import { byId, ChainId } from '@litentry/chaindata'; // Change this to the environment you want to test -const chain = byId['litentry-prod']; +const network = process.env.LITENTRY_NETWORK; +const chain = byId[network as ChainId]; export const nodeEndpoint: string = chain.rpcs[0].url; export const enclaveEndpoint: string = chain.enclaveRpcs[0].url;