mirror of
https://github.com/Gitlawb/openclaude.git
synced 2026-11-06 20:58:14 -04:00
test: reset cached model strings in claude lifecycle tests (#2384)
The custom-gateway lifecycle case initializes the process-global model string table with OpenAI aliases. Teardown did not clear it, so later getAgentModel haiku and fast-mode Opus tests in the same serial process resolved stale gpt-4o aliases. Reset the table in lifecycle setup and teardown.
This commit is contained in:
@@ -7,6 +7,7 @@ import { mkdtempSync, rmSync, writeFileSync } from 'fs'
|
||||
import { tmpdir } from 'os'
|
||||
import { join } from 'path'
|
||||
import {
|
||||
resetModelStringsForTestingOnly,
|
||||
setAllowedSettingSources,
|
||||
setFlagSettingsInline,
|
||||
setFlagSettingsPath,
|
||||
@@ -503,6 +504,7 @@ function setIgnoredApiKeyHelper(): void {
|
||||
|
||||
beforeEach(async () => {
|
||||
await acquireSharedMutationLock('claude.lifecycle.test.ts')
|
||||
resetModelStringsForTestingOnly()
|
||||
setFlagSettingsPath(undefined)
|
||||
setFlagSettingsInline(null)
|
||||
setAllowedSettingSources([...SETTING_SOURCES])
|
||||
@@ -543,6 +545,7 @@ afterEach(async () => {
|
||||
setFlagSettingsPath(undefined)
|
||||
setFlagSettingsInline(null)
|
||||
setAllowedSettingSources([...SETTING_SOURCES])
|
||||
resetModelStringsForTestingOnly()
|
||||
resetSettingsCache()
|
||||
getClaudeAIOAuthTokens.cache?.clear?.()
|
||||
resetGrowthBook()
|
||||
|
||||
Reference in New Issue
Block a user