fix(auth): Fix failing auth test (#7502)

This commit is contained in:
Gal Zahavi
2025-08-31 10:02:38 -07:00
committed by GitHub
parent 17044876f6
commit c0a3122f5f

View File

@@ -39,7 +39,7 @@ describe('validateAuthMethod', () => {
});
it('should return an error message if GEMINI_API_KEY is not set', () => {
vi.stubEnv('GEMINI_API_KEY', '');
vi.stubEnv('GEMINI_API_KEY', undefined);
expect(validateAuthMethod(AuthType.USE_GEMINI)).toBe(
'GEMINI_API_KEY environment variable not found. Add that to your environment and try again (no reload needed if using .env)!',
);
@@ -59,6 +59,8 @@ describe('validateAuthMethod', () => {
});
it('should return an error message if no required environment variables are set', () => {
vi.stubEnv('GOOGLE_CLOUD_PROJECT', undefined);
vi.stubEnv('GOOGLE_CLOUD_LOCATION', undefined);
expect(validateAuthMethod(AuthType.USE_VERTEX_AI)).toBe(
'When using Vertex AI, you must specify either:\n' +
'• GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION environment variables.\n' +