mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
Fix oauth credential caching. (#2709)
This commit is contained in:
committed by
GitHub
parent
f3849627fc
commit
5c4c833ddd
@@ -64,6 +64,7 @@ describe('oauth2', () => {
|
||||
setCredentials: mockSetCredentials,
|
||||
getAccessToken: mockGetAccessToken,
|
||||
credentials: mockTokens,
|
||||
on: vi.fn(),
|
||||
} as unknown as OAuth2Client;
|
||||
vi.mocked(OAuth2Client).mockImplementation(() => mockOAuth2Client);
|
||||
|
||||
@@ -136,10 +137,6 @@ describe('oauth2', () => {
|
||||
});
|
||||
expect(mockSetCredentials).toHaveBeenCalledWith(mockTokens);
|
||||
|
||||
const tokenPath = path.join(tempHomeDir, '.gemini', 'oauth_creds.json');
|
||||
const tokenData = JSON.parse(fs.readFileSync(tokenPath, 'utf-8'));
|
||||
expect(tokenData).toEqual(mockTokens);
|
||||
|
||||
// Verify Google Account ID was cached
|
||||
const googleAccountIdPath = path.join(
|
||||
tempHomeDir,
|
||||
|
||||
Reference in New Issue
Block a user