Skip to content

Commit 561d00a

Browse files
committed
fixed failed test
Signed-off-by: Yi Cai <yicai@redhat.com>
1 parent 3bc4dd2 commit 561d00a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • workspaces/lightspeed/plugins/lightspeed-backend/__fixtures__

workspaces/lightspeed/plugins/lightspeed-backend/__fixtures__/mcpHandlers.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ const MOCK_TOOLS = [
2828
export const mcpHandlers: HttpHandler[] = [
2929
http.post(MOCK_MCP_ADDR, async ({ request }) => {
3030
const auth = request.headers.get('Authorization');
31-
if (auth !== `${MOCK_MCP_VALID_TOKEN}`) {
31+
if (
32+
auth !== MOCK_MCP_VALID_TOKEN &&
33+
auth !== `Bearer ${MOCK_MCP_VALID_TOKEN}`
34+
) {
3235
return HttpResponse.json({ error: 'Unauthorized' }, { status: 401 });
3336
}
3437

0 commit comments

Comments
 (0)