Skip to content

Commit

Permalink
feat: expose and use NILLION_BOOTNODE_MULTIADDRESS env var
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-hm committed Aug 19, 2024
1 parent 7d45875 commit 5e1e617
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/fixture/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: "",
Expand Down
2 changes: 1 addition & 1 deletion packages/fixture/src/prepare-programs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions packages/fixture/src/test-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export const loadEnv = async (): Promise<void> => {
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;
Expand Down

0 comments on commit 5e1e617

Please sign in to comment.