Add new test to verify that when an Authorization header is provided (#3023)
This commit is contained in:
parent
17dfa267d5
commit
aa8e5776eb
|
@ -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 () => {
|
||||||
|
|
Loading…
Reference in New Issue