From bc29c48eeb9247b519bc778aac963e475f0d5781 Mon Sep 17 00:00:00 2001 From: Michael Neale Date: Mon, 13 Jul 2026 23:45:17 +1000 Subject: [PATCH] test: drop unavailable and preview Gemini smoke models (#10355) --- .../tests/integration/test_providers.test.ts | 7 ++++- .../tests/integration/test_providers_lib.ts | 28 ++++++++++--------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/ui/desktop/tests/integration/test_providers.test.ts b/ui/desktop/tests/integration/test_providers.test.ts index 44feb2a7c..470df8163 100644 --- a/ui/desktop/tests/integration/test_providers.test.ts +++ b/ui/desktop/tests/integration/test_providers.test.ts @@ -42,7 +42,12 @@ testNonAgentic('reads files via shell tool', async (tc) => { testdir, 'Use the shell tool to cat ./part-a.txt and ./part-b.txt, then reply with ONLY the contents of both files, one per line, nothing else.', BUILTINS, - { GOOSE_PROVIDER: tc.provider, GOOSE_MODEL: tc.model } + { GOOSE_PROVIDER: tc.provider, GOOSE_MODEL: tc.model }, + 55_000, + (output) => { + const shellToolPattern = /(shell \| developer)|(▸.*shell)/; + return shellToolPattern.test(output) && output.includes(tokenA) && output.includes(tokenB); + } ); const shellToolPattern = /(shell \| developer)|(▸.*shell)/; diff --git a/ui/desktop/tests/integration/test_providers_lib.ts b/ui/desktop/tests/integration/test_providers_lib.ts index 3c0718ac3..d12b46c59 100644 --- a/ui/desktop/tests/integration/test_providers_lib.ts +++ b/ui/desktop/tests/integration/test_providers_lib.ts @@ -84,12 +84,7 @@ function getProviders(): ProviderConfig[] { }, { provider: 'google', - models: [ - 'gemini-2.5-pro', - { name: 'gemini-2.5-flash', flaky: true }, - { name: 'gemini-3-pro-preview', flaky: true }, - 'gemini-3-flash-preview', - ], + models: [{ name: 'gemini-2.5-flash', flaky: true }, 'gemini-3.5-flash'], available: () => hasEnv('GOOGLE_API_KEY'), }, { @@ -369,7 +364,8 @@ export function runGoose( prompt: string, builtins: string, env: Record, - timeoutMs: number = 55_000 + timeoutMs: number = 55_000, + success?: (output: string) => boolean ): Promise { return new Promise((resolve, reject) => { const child: ChildProcess = spawn( @@ -393,12 +389,18 @@ export function runGoose( } }, timeoutMs); - child.stdout?.on('data', (d) => { - output += String(d); - }); - child.stderr?.on('data', (d) => { - output += String(d); - }); + const captureOutput = (data: unknown) => { + output += String(data); + if (!settled && success?.(output)) { + settled = true; + clearTimeout(timer); + child.kill('SIGKILL'); + resolve(output); + } + }; + + child.stdout?.on('data', captureOutput); + child.stderr?.on('data', captureOutput); child.on('close', () => { if (!settled) {