mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(test): isolate gateway network proof ports (#121389)
Amp-Thread-ID: https://ampcode.com/threads/T-019fe995-c7ec-74f2-aaa7-9c48fe9aa4ac Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
committed by
GitHub
parent
d85f5c1176
commit
d6ee4c3570
@@ -13,10 +13,10 @@ import { clearConfigCache, clearRuntimeConfigSnapshot } from "../../../../src/co
|
||||
import { clearSessionStoreCacheForTest } from "../../../../src/config/sessions/store-writer-state.js";
|
||||
import { pickPrimaryLanIPv4 } from "../../../../src/gateway/net.js";
|
||||
import { startGatewayServer, type GatewayServer } from "../../../../src/gateway/server.js";
|
||||
import { getFreeGatewayPort } from "../../../../src/gateway/test-helpers.e2e.js";
|
||||
import { GATEWAY_STARTUP_MUTATED_ENV_KEYS } from "../../../../src/gateway/test-helpers.env.js";
|
||||
import { resetAgentEventsForTest } from "../../../../src/infra/agent-events.js";
|
||||
import { captureEnv, deleteTestEnvValue, setTestEnvValue } from "../../../../src/test-utils/env.js";
|
||||
import { getFreePort } from "../../../../src/test-utils/ports.js";
|
||||
import {
|
||||
GATEWAY_CLIENT_MODES,
|
||||
GATEWAY_CLIENT_NAMES,
|
||||
@@ -365,7 +365,7 @@ export async function runGatewayLoopbackLanProof(): Promise<GatewayLoopbackLanPr
|
||||
);
|
||||
resetGatewayTestState();
|
||||
|
||||
const loopbackPort = await getFreeGatewayPort();
|
||||
const loopbackPort = await getFreePort("0.0.0.0");
|
||||
server = await startGateway(loopbackPort, "loopback", token);
|
||||
const loopbackHealthStatus = await probeHttpHealth({
|
||||
host: "127.0.0.1",
|
||||
@@ -384,7 +384,7 @@ export async function runGatewayLoopbackLanProof(): Promise<GatewayLoopbackLanPr
|
||||
await stopGateway(server);
|
||||
server = undefined;
|
||||
|
||||
const lanPort = await getFreeGatewayPort();
|
||||
const lanPort = await getFreePort("0.0.0.0");
|
||||
server = await startGateway(lanPort, "lan", token);
|
||||
const lanHealthStatus = await probeHttpHealth({
|
||||
host: lanIp,
|
||||
|
||||
Reference in New Issue
Block a user