Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix post-checks test script environment variable #3212

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tee-worker/identity/ts-tests/post-checks/config.ts
Original file line number Diff line number Diff line change
@@ -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;
2 changes: 1 addition & 1 deletion tee-worker/identity/ts-tests/post-checks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down