diff options
-rw-r--r-- | server/lib/activitypub/process/process-create.ts | 2 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-like.ts | 2 | ||||
-rw-r--r-- | server/tests/api/activitypub/client.ts | 2 | ||||
-rw-r--r-- | server/tests/api/activitypub/fetch.ts | 4 | ||||
-rw-r--r-- | server/tests/api/activitypub/helpers.ts | 2 | ||||
-rw-r--r-- | server/tests/api/activitypub/security.ts | 11 | ||||
-rw-r--r-- | server/tests/api/server/no-client.ts | 4 | ||||
-rw-r--r-- | shared/utils/index.ts | 2 |
8 files changed, 18 insertions, 11 deletions
diff --git a/server/lib/activitypub/process/process-create.ts b/server/lib/activitypub/process/process-create.ts index 214e14546..9a72cb899 100644 --- a/server/lib/activitypub/process/process-create.ts +++ b/server/lib/activitypub/process/process-create.ts | |||
@@ -12,7 +12,7 @@ import { getOrCreateVideoAndAccountAndChannel } from '../videos' | |||
12 | import { forwardVideoRelatedActivity } from '../send/utils' | 12 | import { forwardVideoRelatedActivity } from '../send/utils' |
13 | import { Redis } from '../../redis' | 13 | import { Redis } from '../../redis' |
14 | import { createOrUpdateCacheFile } from '../cache-file' | 14 | import { createOrUpdateCacheFile } from '../cache-file' |
15 | import { immutableAssign } from '../../../tests/utils' | 15 | import { immutableAssign } from '../../../../shared/utils' |
16 | import { getVideoDislikeActivityPubUrl } from '../url' | 16 | import { getVideoDislikeActivityPubUrl } from '../url' |
17 | import { VideoModel } from '../../../models/video/video' | 17 | import { VideoModel } from '../../../models/video/video' |
18 | 18 | ||
diff --git a/server/lib/activitypub/process/process-like.ts b/server/lib/activitypub/process/process-like.ts index 0dca17551..be86665e9 100644 --- a/server/lib/activitypub/process/process-like.ts +++ b/server/lib/activitypub/process/process-like.ts | |||
@@ -5,7 +5,7 @@ import { AccountVideoRateModel } from '../../../models/account/account-video-rat | |||
5 | import { ActorModel } from '../../../models/activitypub/actor' | 5 | import { ActorModel } from '../../../models/activitypub/actor' |
6 | import { forwardVideoRelatedActivity } from '../send/utils' | 6 | import { forwardVideoRelatedActivity } from '../send/utils' |
7 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 7 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' |
8 | import { immutableAssign } from '../../../tests/utils' | 8 | import { immutableAssign } from '../../../../shared/utils' |
9 | import { getVideoDislikeActivityPubUrl, getVideoLikeActivityPubUrl } from '../url' | 9 | import { getVideoDislikeActivityPubUrl, getVideoLikeActivityPubUrl } from '../url' |
10 | 10 | ||
11 | async function processLikeActivity (activity: ActivityLike, byActor: ActorModel) { | 11 | async function processLikeActivity (activity: ActivityLike, byActor: ActorModel) { |
diff --git a/server/tests/api/activitypub/client.ts b/server/tests/api/activitypub/client.ts index 334cd4e5c..d45232c8d 100644 --- a/server/tests/api/activitypub/client.ts +++ b/server/tests/api/activitypub/client.ts | |||
@@ -9,7 +9,7 @@ import { | |||
9 | runServer, | 9 | runServer, |
10 | ServerInfo, | 10 | ServerInfo, |
11 | setAccessTokensToServers | 11 | setAccessTokensToServers |
12 | } from '../../shared/utils' | 12 | } from '../../../../shared/utils' |
13 | 13 | ||
14 | 14 | ||
15 | const expect = chai.expect | 15 | const expect = chai.expect |
diff --git a/server/tests/api/activitypub/fetch.ts b/server/tests/api/activitypub/fetch.ts index a42c606c6..e84eb18bb 100644 --- a/server/tests/api/activitypub/fetch.ts +++ b/server/tests/api/activitypub/fetch.ts | |||
@@ -13,10 +13,10 @@ import { | |||
13 | setAccessTokensToServers, | 13 | setAccessTokensToServers, |
14 | uploadVideo, | 14 | uploadVideo, |
15 | userLogin | 15 | userLogin |
16 | } from '../../utils' | 16 | } from '../../../../shared/utils' |
17 | import * as chai from 'chai' | 17 | import * as chai from 'chai' |
18 | import { setActorField, setVideoField } from '../../utils/miscs/sql' | 18 | import { setActorField, setVideoField } from '../../utils/miscs/sql' |
19 | import { waitJobs } from '../../utils/server/jobs' | 19 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
20 | import { Video } from '../../../../shared/models/videos' | 20 | import { Video } from '../../../../shared/models/videos' |
21 | 21 | ||
22 | const expect = chai.expect | 22 | const expect = chai.expect |
diff --git a/server/tests/api/activitypub/helpers.ts b/server/tests/api/activitypub/helpers.ts index 610846247..4c42f3d67 100644 --- a/server/tests/api/activitypub/helpers.ts +++ b/server/tests/api/activitypub/helpers.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { expect } from 'chai' | 4 | import { expect } from 'chai' |
5 | import { buildRequestStub } from '../../utils' | 5 | import { buildRequestStub } from '../../utils/miscs/stubs' |
6 | import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto' | 6 | import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto' |
7 | import { cloneDeep } from 'lodash' | 7 | import { cloneDeep } from 'lodash' |
8 | import { buildSignedActivity } from '../../../helpers/activitypub' | 8 | import { buildSignedActivity } from '../../../helpers/activitypub' |
diff --git a/server/tests/api/activitypub/security.ts b/server/tests/api/activitypub/security.ts index e7899bb14..69b7c0148 100644 --- a/server/tests/api/activitypub/security.ts +++ b/server/tests/api/activitypub/security.ts | |||
@@ -2,7 +2,16 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | 4 | ||
5 | import { flushAndRunMultipleServers, flushTests, killallServers, makePOSTAPRequest, makeFollowRequest, ServerInfo } from '../../utils' | 5 | import { |
6 | flushAndRunMultipleServers, | ||
7 | flushTests, | ||
8 | killallServers, | ||
9 | ServerInfo | ||
10 | } from '../../../../shared/utils' | ||
11 | import { | ||
12 | makePOSTAPRequest, | ||
13 | makeFollowRequest, | ||
14 | } from '../../utils/requests/activitypub' | ||
6 | import { HTTP_SIGNATURE } from '../../../initializers' | 15 | import { HTTP_SIGNATURE } from '../../../initializers' |
7 | import { buildDigest, buildGlobalHeaders } from '../../../lib/job-queue/handlers/utils/activitypub-http-utils' | 16 | import { buildDigest, buildGlobalHeaders } from '../../../lib/job-queue/handlers/utils/activitypub-http-utils' |
8 | import * as chai from 'chai' | 17 | import * as chai from 'chai' |
diff --git a/server/tests/api/server/no-client.ts b/server/tests/api/server/no-client.ts index 6d6ce8532..3b95ce945 100644 --- a/server/tests/api/server/no-client.ts +++ b/server/tests/api/server/no-client.ts | |||
@@ -4,8 +4,8 @@ import { | |||
4 | flushTests, | 4 | flushTests, |
5 | killallServers, | 5 | killallServers, |
6 | ServerInfo | 6 | ServerInfo |
7 | } from '../../utils/index' | 7 | } from '../../../../shared/utils' |
8 | import { runServer } from '../../utils/server/servers' | 8 | import { runServer } from '../../../../shared/utils/server/servers' |
9 | 9 | ||
10 | describe('Start and stop server without web client routes', function () { | 10 | describe('Start and stop server without web client routes', function () { |
11 | let server: ServerInfo | 11 | let server: ServerInfo |
diff --git a/shared/utils/index.ts b/shared/utils/index.ts index 905d93823..897389824 100644 --- a/shared/utils/index.ts +++ b/shared/utils/index.ts | |||
@@ -4,10 +4,8 @@ export * from './server/clients' | |||
4 | export * from './server/config' | 4 | export * from './server/config' |
5 | export * from './users/login' | 5 | export * from './users/login' |
6 | export * from './miscs/miscs' | 6 | export * from './miscs/miscs' |
7 | export * from './miscs/stubs' | ||
8 | export * from './server/follows' | 7 | export * from './server/follows' |
9 | export * from './requests/requests' | 8 | export * from './requests/requests' |
10 | export * from './requests/activitypub' | ||
11 | export * from './server/servers' | 9 | export * from './server/servers' |
12 | export * from './videos/services' | 10 | export * from './videos/services' |
13 | export * from './users/users' | 11 | export * from './users/users' |