Skip to content

Commit 84fe211

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
test(e2e): propagate IPv4 preference to probes
Keep Node-based Playwright requests on the same IPv4 path as Chromium and use direct loopback for orchestrator probes under dual-stack CI DNS.
1 parent 47661af commit 84fe211

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

apps/sim/e2e/foundation/runtime.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ test('Playwright workers run on Node 22', () => {
44
expect(process.release.name).toBe('node')
55
expect(Number(process.versions.node.split('.')[0])).toBe(22)
66
expect(process.execPath.toLowerCase()).not.toContain('bun')
7+
expect(process.env.NODE_OPTIONS).toContain('--dns-result-order=ipv4first')
78
})

apps/sim/e2e/scripts/run.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ async function main(): Promise<void> {
199199
await buildApp(stackOptions)
200200
realtime = await startRealtime(stackOptions)
201201
app = await startApp(stackOptions)
202-
await assertAdminApiBoundary(E2E_ORIGIN, profile.childEnvironment.env.ADMIN_API_KEY)
202+
await assertAdminApiBoundary(
203+
'http://127.0.0.1:3000',
204+
profile.childEnvironment.env.ADMIN_API_KEY
205+
)
203206
assertNoForbiddenProviderInitialization([app.logPath, realtime.logPath])
204207

205208
const playwrightEnvironment = createPlaywrightEnvironment(
@@ -293,7 +296,7 @@ function createPlaywrightEnvironment(
293296
storageStateDirectory: string,
294297
markerDirectory: string
295298
): Record<string, string> {
296-
const keys = [...E2E_OS_PASSTHROUGH_KEYS, 'HOME', 'PLAYWRIGHT_BROWSERS_PATH']
299+
const keys = [...E2E_OS_PASSTHROUGH_KEYS, 'HOME', 'NODE_OPTIONS', 'PLAYWRIGHT_BROWSERS_PATH']
297300
const env: Record<string, string> = {}
298301
for (const key of keys) {
299302
const value = stackEnvironment[key]

0 commit comments

Comments
 (0)