Skip to content

Commit ee4873a

Browse files
author
andypalmi
committed
test(mcp): authenticate equivalence smokes with the expert-mcp platform token
Mint the nameless user:expert-mcp platform token via createExpertMcpToken instead of a named personal access token, so the search tool smoke tests go through the same IMPLICIT_TOKEN_SCOPES allow-list check the Expert uses in production.
1 parent c83e252 commit ee4873a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/unit/forge/ee/lib/mcp/tools/search_spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const should = require('should') // eslint-disable-line no-unused-vars
22

3-
const { expectToolMatchesRoute } = require('../../../../../../lib/mcpToolEquivalence')
3+
const { expectToolMatchesRoute, createExpertMcpToken } = require('../../../../../../lib/mcpToolEquivalence')
44

55
const FF_UTIL = require('flowforge-test-utils')
66
const tools = FF_UTIL.require('forge/ee/lib/mcp/tools/search')
@@ -66,11 +66,11 @@ describe('MCP Search Tools', function () {
6666
const setup = require('../../../setup')
6767

6868
let app
69-
let pat
69+
let token
7070

7171
before(async function () {
7272
app = await setup({ ai: { enabled: true }, expert: { enabled: true } })
73-
pat = await app.db.controllers.AccessToken.createPersonalAccessToken(app.user, '', null, 'smoke-pat')
73+
token = await createExpertMcpToken(app)
7474
})
7575

7676
after(async function () {
@@ -81,7 +81,7 @@ describe('MCP Search Tools', function () {
8181
...options,
8282
headers: {
8383
...(options.headers || {}),
84-
authorization: `Bearer ${pat.token}`
84+
authorization: `Bearer ${token}`
8585
}
8686
})
8787

0 commit comments

Comments
 (0)