aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-23 14:24:50 +0100
committerChocobozzz <me@florianbigard.com>2022-03-23 14:24:50 +0100
commit7e98a7df7d04e19ba67163a86c7b876d78d76839 (patch)
tree080c9bf63d2b00b43dca94e3c67cdc2a768308fc /server/tests
parent5302f77d095c2188859ee463128aa59eec20ea88 (diff)
downloadPeerTube-7e98a7df7d04e19ba67163a86c7b876d78d76839.tar.gz
PeerTube-7e98a7df7d04e19ba67163a86c7b876d78d76839.tar.zst
PeerTube-7e98a7df7d04e19ba67163a86c7b876d78d76839.zip
Remove activitypub helper
Put functions in lib/activitypub instead
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/activitypub/helpers.ts2
-rw-r--r--server/tests/api/activitypub/security.ts3
-rw-r--r--server/tests/shared/requests.ts2
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'
5import { cloneDeep } from 'lodash' 5import { cloneDeep } from 'lodash'
6import { buildRequestStub } from '@server/tests/shared' 6import { buildRequestStub } from '@server/tests/shared'
7import { buildAbsoluteFixturePath } from '@shared/core-utils' 7import { buildAbsoluteFixturePath } from '@shared/core-utils'
8import { buildSignedActivity } from '../../../helpers/activitypub'
9import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto' 8import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto'
9import { buildSignedActivity } from '../../../lib/activitypub/activity'
10 10
11describe('Test activity pub helpers', function () { 11describe('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
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { activityPubContextify, buildSignedActivity } from '@server/helpers/activitypub'
6import { buildDigest } from '@server/helpers/peertube-crypto' 5import { buildDigest } from '@server/helpers/peertube-crypto'
7import { HTTP_SIGNATURE } from '@server/initializers/constants' 6import { HTTP_SIGNATURE } from '@server/initializers/constants'
7import { buildSignedActivity } from '@server/lib/activitypub/activity'
8import { activityPubContextify } from '@server/lib/activitypub/context'
8import { buildGlobalHeaders } from '@server/lib/job-queue/handlers/utils/activitypub-http-utils' 9import { buildGlobalHeaders } from '@server/lib/job-queue/handlers/utils/activitypub-http-utils'
9import { makeFollowRequest, makePOSTAPRequest } from '@server/tests/shared' 10import { makeFollowRequest, makePOSTAPRequest } from '@server/tests/shared'
10import { buildAbsoluteFixturePath, wait } from '@shared/core-utils' 11import { 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 @@
1import { activityPubContextify } from '@server/helpers/activitypub'
2import { buildDigest } from '@server/helpers/peertube-crypto' 1import { buildDigest } from '@server/helpers/peertube-crypto'
3import { doRequest } from '@server/helpers/requests' 2import { doRequest } from '@server/helpers/requests'
4import { ACTIVITY_PUB, HTTP_SIGNATURE } from '@server/initializers/constants' 3import { ACTIVITY_PUB, HTTP_SIGNATURE } from '@server/initializers/constants'
4import { activityPubContextify } from '@server/lib/activitypub/context'
5 5
6export function makePOSTAPRequest (url: string, body: any, httpSignature: any, headers: any) { 6export function makePOSTAPRequest (url: string, body: any, httpSignature: any, headers: any) {
7 const options = { 7 const options = {