diff options
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/activitypub/helpers.ts | 2 | ||||
-rw-r--r-- | server/tests/api/activitypub/security.ts | 3 | ||||
-rw-r--r-- | server/tests/shared/requests.ts | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/server/tests/api/activitypub/helpers.ts b/server/tests/api/activitypub/helpers.ts index 25e1d9823..e516cf49e 100644 --- a/server/tests/api/activitypub/helpers.ts +++ b/server/tests/api/activitypub/helpers.ts | |||
@@ -5,8 +5,8 @@ import { expect } from 'chai' | |||
5 | import { cloneDeep } from 'lodash' | 5 | import { cloneDeep } from 'lodash' |
6 | import { buildRequestStub } from '@server/tests/shared' | 6 | import { buildRequestStub } from '@server/tests/shared' |
7 | import { buildAbsoluteFixturePath } from '@shared/core-utils' | 7 | import { buildAbsoluteFixturePath } from '@shared/core-utils' |
8 | import { buildSignedActivity } from '../../../helpers/activitypub' | ||
9 | import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto' | 8 | import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto' |
9 | import { buildSignedActivity } from '../../../lib/activitypub/activity' | ||
10 | 10 | ||
11 | describe('Test activity pub helpers', function () { | 11 | describe('Test activity pub helpers', function () { |
12 | describe('When checking the Linked Signature', function () { | 12 | describe('When checking the Linked Signature', function () { |
diff --git a/server/tests/api/activitypub/security.ts b/server/tests/api/activitypub/security.ts index c4cb5ea0d..da9880d7d 100644 --- a/server/tests/api/activitypub/security.ts +++ b/server/tests/api/activitypub/security.ts | |||
@@ -2,9 +2,10 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { activityPubContextify, buildSignedActivity } from '@server/helpers/activitypub' | ||
6 | import { buildDigest } from '@server/helpers/peertube-crypto' | 5 | import { buildDigest } from '@server/helpers/peertube-crypto' |
7 | import { HTTP_SIGNATURE } from '@server/initializers/constants' | 6 | import { HTTP_SIGNATURE } from '@server/initializers/constants' |
7 | import { buildSignedActivity } from '@server/lib/activitypub/activity' | ||
8 | import { activityPubContextify } from '@server/lib/activitypub/context' | ||
8 | import { buildGlobalHeaders } from '@server/lib/job-queue/handlers/utils/activitypub-http-utils' | 9 | import { buildGlobalHeaders } from '@server/lib/job-queue/handlers/utils/activitypub-http-utils' |
9 | import { makeFollowRequest, makePOSTAPRequest } from '@server/tests/shared' | 10 | import { makeFollowRequest, makePOSTAPRequest } from '@server/tests/shared' |
10 | import { buildAbsoluteFixturePath, wait } from '@shared/core-utils' | 11 | import { buildAbsoluteFixturePath, wait } from '@shared/core-utils' |
diff --git a/server/tests/shared/requests.ts b/server/tests/shared/requests.ts index 7f1acc0e1..d7aedf82f 100644 --- a/server/tests/shared/requests.ts +++ b/server/tests/shared/requests.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { activityPubContextify } from '@server/helpers/activitypub' | ||
2 | import { buildDigest } from '@server/helpers/peertube-crypto' | 1 | import { buildDigest } from '@server/helpers/peertube-crypto' |
3 | import { doRequest } from '@server/helpers/requests' | 2 | import { doRequest } from '@server/helpers/requests' |
4 | import { ACTIVITY_PUB, HTTP_SIGNATURE } from '@server/initializers/constants' | 3 | import { ACTIVITY_PUB, HTTP_SIGNATURE } from '@server/initializers/constants' |
4 | import { activityPubContextify } from '@server/lib/activitypub/context' | ||
5 | 5 | ||
6 | export function makePOSTAPRequest (url: string, body: any, httpSignature: any, headers: any) { | 6 | export function makePOSTAPRequest (url: string, body: any, httpSignature: any, headers: any) { |
7 | const options = { | 7 | const options = { |