Skip to content

Commit 84edc1f

Browse files
author
andypalmi
committed
test(mcp): authenticate equivalence smokes with the expert-mcp platform token
1 parent 902259a commit 84edc1f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/unit/forge/ee/lib/mcp/tools/snapshots_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

@@ -169,14 +169,14 @@ describe('MCP Tools - snapshots', function () {
169169
const setup = require('../../../setup')
170170

171171
let app
172-
let pat
172+
let token
173173
let instanceSnapshot
174174
let device
175175
let deviceSnapshot
176176

177177
before(async function () {
178178
app = await setup({ ai: { enabled: true }, expert: { enabled: true } })
179-
pat = await app.db.controllers.AccessToken.createPersonalAccessToken(app.user, '', null, 'smoke-pat')
179+
token = await createExpertMcpToken(app)
180180

181181
instanceSnapshot = await app.factory.createSnapshot(
182182
{ name: 'instance-snapshot-1', description: 'first instance snapshot' },
@@ -205,7 +205,7 @@ describe('MCP Tools - snapshots', function () {
205205
...options,
206206
headers: {
207207
...(options.headers || {}),
208-
authorization: `Bearer ${pat.token}`
208+
authorization: `Bearer ${token}`
209209
}
210210
})
211211
}

0 commit comments

Comments
 (0)