diff --git a/CHANGELOG.md b/CHANGELOG.md index 9db73db7..4fde54c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ Version header format: `[version] Name - year-month-day (entropy-core compatibil - `configurationSchema` & `auxiliaryDataSchema` to `ProgramInterface` - added new testing function `jumpStartNetwork(entropy: Entropy) => Promise` This function must be called now with a funded key to kick off the network. **It will not work for networks with less then 4 validators** - added new docker script for four nodes + - `spinNetworkDown` now has an access to the env var `ENTROPY_DONT_KILL` which will preserve the network + the initial though for this was to look at network logs for debugging ### Fixed diff --git a/dev/testing-utils.mjs b/dev/testing-utils.mjs index 15c081b9..55f2aa58 100644 --- a/dev/testing-utils.mjs +++ b/dev/testing-utils.mjs @@ -136,6 +136,10 @@ total-block-time: ${headersSenseStart} blocks } export async function spinNetworkDown (networkType = 'four-nodes') { + if (!process.env.ENTROPY_DONT_KILL) { + console.warn('$ENTROPY_DONT_KILL is set not spinning the network down') + return false + } try { execFileSync('dev/bin/spin-down.sh', [networkType], { shell: true, diff --git a/tests/end-to-end.test.ts b/tests/end-to-end.test.ts index 8cced5ff..403b63c6 100644 --- a/tests/end-to-end.test.ts +++ b/tests/end-to-end.test.ts @@ -24,7 +24,7 @@ test('End To End', async (t) => { await run('network up', spinNetworkUp(networkType)) t.teardown(async () => { await entropy.close() - if (!process.env.DONT_KILL) await spinNetworkDown(networkType).catch((error) => + await spinNetworkDown(networkType).catch((error) => console.error('Error while spinning network down', error.message) ) })