Skip to content

Commit

Permalink
Fix post-checks test script environment variable (#3212)
Browse files Browse the repository at this point in the history
* fix script

* change network
  • Loading branch information
0xverin authored Dec 31, 2024
1 parent ba685cc commit 96a2716
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit 96a2716

Please sign in to comment.