mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
test: fix CodeIndexManager test mock to provide proper secrets
- Updated mock contextProxy to provide valid secrets for re-initialization - Ensures the configuration is considered valid during test execution
This commit is contained in:
parent
a3a5f4eeac
commit
2e4029e560
1 changed files with 6 additions and 1 deletions
|
|
@ -527,7 +527,12 @@ describe("CodeIndexManager - handleSettingsChange regression", () => {
|
|||
getValue: vi.fn(),
|
||||
setValue: vi.fn(),
|
||||
storeSecret: vi.fn(),
|
||||
getSecret: vi.fn(),
|
||||
getSecret: vi.fn().mockImplementation((key: string) => {
|
||||
// Return appropriate secret based on key for the config to be valid
|
||||
if (key === "codeIndexOpenAiKey") return "test-openai-key"
|
||||
if (key === "codeIndexQdrantApiKey") return "test-qdrant-key"
|
||||
return ""
|
||||
}),
|
||||
refreshSecrets: vi.fn().mockResolvedValue(undefined),
|
||||
getGlobalState: vi.fn().mockReturnValue({
|
||||
codebaseIndexEnabled: true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue