From 82e39b7237c617d47c3f7550048297920c56041e Mon Sep 17 00:00:00 2001 From: busma13 Date: Tue, 31 Oct 2023 15:26:41 -0700 Subject: [PATCH] Add host ip to setAlias function. --- e2e/test/global.setup.js | 2 +- packages/scripts/src/helpers/scripts.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e/test/global.setup.js b/e2e/test/global.setup.js index 2c64eccd4f9..906f900bb2a 100644 --- a/e2e/test/global.setup.js +++ b/e2e/test/global.setup.js @@ -44,7 +44,7 @@ module.exports = async () => { await pDelay(2000); await teraslice.waitForTeraslice(); await pDelay(2000); - await setAliasAndBaseAssets(); + await setAliasAndBaseAssets(HOST_IP); await pDelay(2000); } else { await Promise.all([setupTerasliceConfig(), downloadAssets()]); diff --git a/packages/scripts/src/helpers/scripts.ts b/packages/scripts/src/helpers/scripts.ts index d98a1105441..ebd83671f69 100644 --- a/packages/scripts/src/helpers/scripts.ts +++ b/packages/scripts/src/helpers/scripts.ts @@ -715,17 +715,17 @@ export async function deployK8sTeraslice() { } } -export async function setAliasAndBaseAssets() { - await setAlias(); +export async function setAliasAndBaseAssets(hostIP: string) { + await setAlias(hostIP); await deployAssets('elasticsearch'); await deployAssets('standard'); await deployAssets('kafka'); } -async function setAlias() { +async function setAlias(hostIP: string) { let subprocess = await execa.command('earl aliases remove k8se2e 2> /dev/null || true', { shell: true }); signale.debug(subprocess.stdout); - subprocess = await execa.command('earl aliases add k8se2e http://localhost:45678'); + subprocess = await execa.command(`earl aliases add k8se2e http://${hostIP}:45678`); signale.debug(subprocess.stdout); // console.log('setAlias subprocess: ', subprocess1, subprocess2); }