From 5e1e6173a870e06ce2928c33d83c68315a23a6c1 Mon Sep 17 00:00:00 2001 From: Tim Holmes-Mitra Date: Mon, 19 Aug 2024 08:23:06 +0100 Subject: [PATCH] feat: expose and use `NILLION_BOOTNODE_MULTIADDRESS` env var --- packages/fixture/src/main.ts | 2 +- packages/fixture/src/prepare-programs.ts | 2 +- packages/fixture/src/test-env.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/fixture/src/main.ts b/packages/fixture/src/main.ts index a93e0aca..3070e7bd 100644 --- a/packages/fixture/src/main.ts +++ b/packages/fixture/src/main.ts @@ -7,13 +7,13 @@ import { createProgramFixtures } from "./prepare-programs"; import { runDevnet } from "./run-devnet"; import { runTests } from "./run-tests"; -// partyId: "12D3KooWEnWNWnuzuckMhAEKKMPvdDacy3K3tdCQDBtctsYMPe5r", export const TestEnv = { NILLION_TEST_TARGET: "", NILLION_TEST_DEVNET_PID: -1, NILLION_TEST_DEVNET_SEED: "test-fixture", NILLION_TEST_PROGRAMS_NAMESPACE: "", + NILLION_BOOTNODE_MULTIADDRESS: "", NILLION_BOOTNODE_WEBSOCKET: "", NILLION_CLUSTER_ID: "", NILLION_NILCHAIN_CHAIN_ID: "", diff --git a/packages/fixture/src/prepare-programs.ts b/packages/fixture/src/prepare-programs.ts index 12ebf97a..68127d7d 100644 --- a/packages/fixture/src/prepare-programs.ts +++ b/packages/fixture/src/prepare-programs.ts @@ -34,7 +34,7 @@ const storeProgram = async (distDir: string, binaryName: string) => { env: { PATH: process.env.PATH }, extendEnv: false, })`nillion - -b ${TestEnv.NILLION_BOOTNODE_WEBSOCKET} + -b ${TestEnv.NILLION_BOOTNODE_MULTIADDRESS} --node-key-seed ${randomUUID().toString()}, --user-key-seed ${TestEnv.NILLION_USER_SEED} --nilchain-rpc-endpoint ${TestEnv.NILLION_NILCHAIN_JSON_RPC} diff --git a/packages/fixture/src/test-env.ts b/packages/fixture/src/test-env.ts index fee7759f..9b7a0999 100644 --- a/packages/fixture/src/test-env.ts +++ b/packages/fixture/src/test-env.ts @@ -39,6 +39,8 @@ export const loadEnv = async (): Promise => { const file = await waitForFileSync(path); const fromEnvFile = parse(file); + TestEnv.NILLION_BOOTNODE_MULTIADDRESS = + fromEnvFile.NILLION_BOOTNODE_MULTIADDRESS; TestEnv.NILLION_BOOTNODE_WEBSOCKET = fromEnvFile.NILLION_BOOTNODE_WEBSOCKET; TestEnv.NILLION_CLUSTER_ID = fromEnvFile.NILLION_CLUSTER_ID; TestEnv.NILLION_NILCHAIN_CHAIN_ID = fromEnvFile.NILLION_NILCHAIN_CHAIN_ID;