Skip to content

Commit 2ab3b22

Browse files
committed
test(gateway): stabilize suite bind defaults
1 parent 9e3a917 commit 2ab3b22

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/gateway/test-helpers.server.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ let lastSyncedSessionStorePath: string | undefined;
9595
let lastSyncedSessionConfigJson: string | undefined;
9696
let activeSuiteGatewayServerCount = 0;
9797
let activeSuiteHookScopeCount = 0;
98+
// Gateway tests exercise RPC/server behavior, not production bind auto-detection by default.
99+
// Keep suite fixtures loopback-stable inside containers; bind-specific tests opt in explicitly.
100+
const DEFAULT_GATEWAY_TEST_BIND = "loopback" as const;
98101

99102
function resolveGatewayTestMainSessionKeys(): string[] {
100103
const resolved = resolveMainSessionKeyFromConfig();
@@ -316,7 +319,7 @@ async function resetGatewayTestState(options: { uniqueConfigRoot: boolean }) {
316319
sessionStoreSaveDelayMs.value = 0;
317320
testTailnetIPv4.value = undefined;
318321
testTailscaleWhois.value = null;
319-
testState.gatewayBind = undefined;
322+
testState.gatewayBind = DEFAULT_GATEWAY_TEST_BIND;
320323
testState.gatewayAuth = { mode: "token", token: "test-gateway-token-1234567890" };
321324
testState.gatewayControlUi = undefined;
322325
testState.hooksConfig = undefined;
@@ -407,7 +410,7 @@ async function resetGatewayTestRuntimeOnly() {
407410
sessionStoreSaveDelayMs.value = 0;
408411
testTailnetIPv4.value = undefined;
409412
testTailscaleWhois.value = null;
410-
testState.gatewayBind = undefined;
413+
testState.gatewayBind = DEFAULT_GATEWAY_TEST_BIND;
411414
testState.gatewayAuth = { mode: "token", token: "test-gateway-token-1234567890" };
412415
testState.gatewayControlUi = undefined;
413416
testState.hooksConfig = undefined;

0 commit comments

Comments
 (0)