First take at mocking out gemini cli responses in integration tests (#11156)

This commit is contained in:
Jacob MacDonald
2025-10-23 16:10:43 -07:00
committed by GitHub
parent b77381750c
commit b16fe7b646
12 changed files with 507 additions and 25 deletions

View File

@@ -68,6 +68,7 @@ export interface CliArgs {
useSmartEdit: boolean | undefined;
useWriteTodos: boolean | undefined;
outputFormat: string | undefined;
fakeResponses: string | undefined;
}
export async function parseArguments(settings: Settings): Promise<CliArgs> {
@@ -193,6 +194,10 @@ export async function parseArguments(settings: Settings): Promise<CliArgs> {
description: 'The format of the CLI output.',
choices: ['text', 'json', 'stream-json'],
})
.option('fake-responses', {
type: 'string',
description: 'Path to a file with fake model responses for testing.',
})
.deprecateOption(
'prompt',
'Use the positional prompt instead. This flag will be removed in a future version.',
@@ -649,6 +654,7 @@ export async function loadCliConfig(
settings.tools?.enableMessageBusIntegration ?? false,
codebaseInvestigatorSettings:
settings.experimental?.codebaseInvestigatorSettings,
fakeResponses: argv.fakeResponses,
retryFetchErrors: settings.general?.retryFetchErrors ?? false,
ptyInfo: ptyInfo?.name,
});