Skip to content

Commit

Permalink
fix: update metrics tests with scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Nil20 committed Nov 7, 2024
1 parent 0371694 commit 4d53f8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/metrics/src/features/metrics/handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { readFileSync } from 'fs'
import * as jwt from 'jsonwebtoken'
import * as fetchMock from 'jest-fetch-mock'
import { influx } from '@metrics/influxdb/client'
import { SCOPES } from '@opencrvs/commons/authentication'

const fetch: fetchMock.FetchMock = fetchMock as fetchMock.FetchMock

Expand Down Expand Up @@ -199,7 +200,7 @@ describe('verify metrics handler', () => {
describe('delete metrics measurement handler', () => {
let server: any
const token = jwt.sign(
{ scope: ['declare', 'natlsysadmin'] },
{ scope: [SCOPES.CONFIG_UPDATE_ALL] },
readFileSync('./test/cert.key'),
{
algorithm: 'RS256',
Expand Down

0 comments on commit 4d53f8f

Please sign in to comment.