mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Add new test to verify that when an Authorization header is provided (#3023)
This commit is contained in:
@@ -385,6 +385,18 @@ describe('discoverMcpTools', () => {
|
|||||||
{},
|
{},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should pass oauth token when provided', async () => {
|
||||||
|
const headers = {
|
||||||
|
Authorization: 'Bearer test-token',
|
||||||
|
};
|
||||||
|
const { serverConfig } = await setupHttpTest(headers);
|
||||||
|
|
||||||
|
expect(StreamableHTTPClientTransport).toHaveBeenCalledWith(
|
||||||
|
new URL(serverConfig.httpUrl!),
|
||||||
|
{ requestInit: { headers } },
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should prefix tool names if multiple MCP servers are configured', async () => {
|
it('should prefix tool names if multiple MCP servers are configured', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user