Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 committed Nov 22, 2024
1 parent 2620c83 commit 7e130c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions yarn-project/end-to-end/src/spartan/reorg.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ describe('reorg test', () => {
let testWallets: TestWallets;

it('survives a reorg', async () => {
console.log('Starting port forwards');
await startPortForward({
resource: `svc/${config.INSTANCE_NAME}-aztec-network-pxe`,
namespace: NAMESPACE,
Expand All @@ -58,6 +59,7 @@ describe('reorg test', () => {
containerPort: CONTAINER_ETHEREUM_PORT,
hostPort: HOST_ETHEREUM_PORT,
});
console.log('Port forwards started');
testWallets = await setupTestWalletsWithTokens(PXE_URL, MINT_AMOUNT, debugLogger);
const ethCheatCodes = new EthCheatCodes(ETHEREUM_HOST);
const rollupCheatCodes = new RollupCheatCodes(
Expand Down
4 changes: 3 additions & 1 deletion yarn-project/end-to-end/src/spartan/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,17 @@ export async function startPortForward({
const { stdout: processId } = await execAsync(command);
if (processId) {
logger.info(`Restarting port forward for ${resource}:${hostPort}`);
console.log(`Restarting port forward for ${resource}:${hostPort}`);
// kill the existing port forward
await execAsync(`kill -9 ${processId}`);
}
} catch (e) {
logger.info(`No existing port forward found for ${resource}:${hostPort}`);
console.log(`No existing port forward found for ${resource}:${hostPort}`);
}

logger.info(`kubectl port-forward -n ${namespace} ${resource} ${hostPort}:${containerPort}`);

console.log(`kubectl port-forward -n ${namespace} ${resource} ${hostPort}:${containerPort}`);
const process = spawn('kubectl', ['port-forward', '-n', namespace, resource, `${hostPort}:${containerPort}`], {
detached: true,
windowsHide: true,
Expand Down

0 comments on commit 7e130c2

Please sign in to comment.