mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix: e2e test on cloud build
This commit is contained in:
@@ -36,10 +36,10 @@ describe('JSON output', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should return a JSON error for enforced auth mismatch before running', async () => {
|
it('should return a JSON error for enforced auth mismatch before running', async () => {
|
||||||
process.env['QWEN_OAUTH'] = 'true';
|
process.env['OPENAI_API_KEY'] = 'test-key';
|
||||||
await rig.setup('json-output-auth-mismatch', {
|
await rig.setup('json-output-auth-mismatch', {
|
||||||
settings: {
|
settings: {
|
||||||
security: { auth: { enforcedType: 'openai' } },
|
security: { auth: { enforcedType: 'qwen-oauth' } },
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ describe('JSON output', () => {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
thrown = e as Error;
|
thrown = e as Error;
|
||||||
} finally {
|
} finally {
|
||||||
delete process.env['QWEN_OAUTH'];
|
delete process.env['OPENAI_API_KEY'];
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(thrown).toBeDefined();
|
expect(thrown).toBeDefined();
|
||||||
@@ -79,7 +79,9 @@ describe('JSON output', () => {
|
|||||||
expect(payload.error).toBeDefined();
|
expect(payload.error).toBeDefined();
|
||||||
expect(payload.error.type).toBe('Error');
|
expect(payload.error.type).toBe('Error');
|
||||||
expect(payload.error.code).toBe(1);
|
expect(payload.error.code).toBe(1);
|
||||||
expect(payload.error.message).toContain('configured auth type is openai');
|
expect(payload.error.message).toContain(
|
||||||
expect(payload.error.message).toContain('current auth type is qwen-oauth');
|
'configured auth type is qwen-oauth',
|
||||||
|
);
|
||||||
|
expect(payload.error.message).toContain('current auth type is openai');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user