Skip to content

Commit

Permalink
Add host ip to setAlias function.
Browse files Browse the repository at this point in the history
  • Loading branch information
busma13 committed Oct 31, 2023
1 parent 6b54826 commit 82e39b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion e2e/test/global.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()]);
Expand Down
8 changes: 4 additions & 4 deletions packages/scripts/src/helpers/scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 82e39b7

Please sign in to comment.