diff options
Diffstat (limited to 'server/tests/api/activitypub/security.ts')
-rw-r--r-- | server/tests/api/activitypub/security.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/tests/api/activitypub/security.ts b/server/tests/api/activitypub/security.ts index 364b53e0f..61db272f6 100644 --- a/server/tests/api/activitypub/security.ts +++ b/server/tests/api/activitypub/security.ts | |||
@@ -5,6 +5,7 @@ import * as chai from 'chai' | |||
5 | import { buildDigest } from '@server/helpers/peertube-crypto' | 5 | import { buildDigest } from '@server/helpers/peertube-crypto' |
6 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | 6 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' |
7 | import { | 7 | import { |
8 | buildAbsoluteFixturePath, | ||
8 | cleanupTests, | 9 | cleanupTests, |
9 | closeAllSequelize, | 10 | closeAllSequelize, |
10 | flushAndRunMultipleServers, | 11 | flushAndRunMultipleServers, |
@@ -40,7 +41,7 @@ function setUpdatedAtOfServer (onServer: ServerInfo, ofServer: ServerInfo, updat | |||
40 | } | 41 | } |
41 | 42 | ||
42 | function getAnnounceWithoutContext (server: ServerInfo) { | 43 | function getAnnounceWithoutContext (server: ServerInfo) { |
43 | const json = require('./json/peertube/announce-without-context.json') | 44 | const json = require(buildAbsoluteFixturePath('./ap-json/peertube/announce-without-context.json')) |
44 | const result: typeof json = {} | 45 | const result: typeof json = {} |
45 | 46 | ||
46 | for (const key of Object.keys(json)) { | 47 | for (const key of Object.keys(json)) { |
@@ -58,8 +59,8 @@ describe('Test ActivityPub security', function () { | |||
58 | let servers: ServerInfo[] | 59 | let servers: ServerInfo[] |
59 | let url: string | 60 | let url: string |
60 | 61 | ||
61 | const keys = require('./json/peertube/keys.json') | 62 | const keys = require(buildAbsoluteFixturePath('./ap-json/peertube/keys.json')) |
62 | const invalidKeys = require('./json/peertube/invalid-keys.json') | 63 | const invalidKeys = require(buildAbsoluteFixturePath('./ap-json/peertube/invalid-keys.json')) |
63 | const baseHttpSignature = () => ({ | 64 | const baseHttpSignature = () => ({ |
64 | algorithm: HTTP_SIGNATURE.ALGORITHM, | 65 | algorithm: HTTP_SIGNATURE.ALGORITHM, |
65 | authorizationHeaderName: HTTP_SIGNATURE.HEADER_NAME, | 66 | authorizationHeaderName: HTTP_SIGNATURE.HEADER_NAME, |