diff options
Diffstat (limited to 'server/tests')
85 files changed, 245 insertions, 233 deletions
diff --git a/server/tests/api/activitypub/client.ts b/server/tests/api/activitypub/client.ts index 6d90d8643..52e7e27f8 100644 --- a/server/tests/api/activitypub/client.ts +++ b/server/tests/api/activitypub/client.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | ServerInfo, | 11 | ServerInfo, |
12 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
13 | uploadVideo | 13 | uploadVideo |
14 | } from '../../../../shared/utils' | 14 | } from '../../../../shared/extra-utils' |
15 | 15 | ||
16 | const expect = chai.expect | 16 | const expect = chai.expect |
17 | 17 | ||
diff --git a/server/tests/api/activitypub/fetch.ts b/server/tests/api/activitypub/fetch.ts index 9cbc7dd84..f9dba3418 100644 --- a/server/tests/api/activitypub/fetch.ts +++ b/server/tests/api/activitypub/fetch.ts | |||
@@ -17,7 +17,7 @@ import { | |||
17 | uploadVideo, | 17 | uploadVideo, |
18 | userLogin, | 18 | userLogin, |
19 | waitJobs | 19 | waitJobs |
20 | } from '../../../../shared/utils' | 20 | } from '../../../../shared/extra-utils' |
21 | import * as chai from 'chai' | 21 | import * as chai from 'chai' |
22 | import { Video } from '../../../../shared/models/videos' | 22 | import { Video } from '../../../../shared/models/videos' |
23 | 23 | ||
diff --git a/server/tests/api/activitypub/helpers.ts b/server/tests/api/activitypub/helpers.ts index ac6e755c3..365d0e1ae 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 '../../../../shared/utils/miscs/stubs' | 5 | import { buildRequestStub } from '../../../../shared/extra-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/refresher.ts b/server/tests/api/activitypub/refresher.ts index 665a9f9f0..7b08b1dab 100644 --- a/server/tests/api/activitypub/refresher.ts +++ b/server/tests/api/activitypub/refresher.ts | |||
@@ -20,8 +20,8 @@ import { | |||
20 | uploadVideoAndGetId, | 20 | uploadVideoAndGetId, |
21 | wait, | 21 | wait, |
22 | waitJobs | 22 | waitJobs |
23 | } from '../../../../shared/utils' | 23 | } from '../../../../shared/extra-utils' |
24 | import { getAccount } from '../../../../shared/utils/users/accounts' | 24 | import { getAccount } from '../../../../shared/extra-utils/users/accounts' |
25 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos' | 25 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos' |
26 | 26 | ||
27 | describe('Test AP refresher', function () { | 27 | describe('Test AP refresher', function () { |
diff --git a/server/tests/api/activitypub/security.ts b/server/tests/api/activitypub/security.ts index 2c55876ba..2346e9c8e 100644 --- a/server/tests/api/activitypub/security.ts +++ b/server/tests/api/activitypub/security.ts | |||
@@ -9,12 +9,12 @@ import { | |||
9 | killallServers, | 9 | killallServers, |
10 | ServerInfo, | 10 | ServerInfo, |
11 | setActorField | 11 | setActorField |
12 | } from '../../../../shared/utils' | 12 | } from '../../../../shared/extra-utils' |
13 | import { HTTP_SIGNATURE } from '../../../initializers/constants' | 13 | import { HTTP_SIGNATURE } from '../../../initializers/constants' |
14 | import { buildDigest, buildGlobalHeaders } from '../../../lib/job-queue/handlers/utils/activitypub-http-utils' | 14 | import { buildDigest, buildGlobalHeaders } from '../../../lib/job-queue/handlers/utils/activitypub-http-utils' |
15 | import * as chai from 'chai' | 15 | import * as chai from 'chai' |
16 | import { activityPubContextify, buildSignedActivity } from '../../../helpers/activitypub' | 16 | import { activityPubContextify, buildSignedActivity } from '../../../helpers/activitypub' |
17 | import { makeFollowRequest, makePOSTAPRequest } from '../../../../shared/utils/requests/activitypub' | 17 | import { makeFollowRequest, makePOSTAPRequest } from '../../../../shared/extra-utils/requests/activitypub' |
18 | 18 | ||
19 | const expect = chai.expect | 19 | const expect = chai.expect |
20 | 20 | ||
diff --git a/server/tests/api/check-params/accounts.ts b/server/tests/api/check-params/accounts.ts index 68f9519c6..4c145c41d 100644 --- a/server/tests/api/check-params/accounts.ts +++ b/server/tests/api/check-params/accounts.ts | |||
@@ -2,13 +2,13 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | 4 | ||
5 | import { flushTests, killallServers, runServer, ServerInfo } from '../../../../shared/utils' | 5 | import { flushTests, killallServers, runServer, ServerInfo } from '../../../../shared/extra-utils' |
6 | import { | 6 | import { |
7 | checkBadCountPagination, | 7 | checkBadCountPagination, |
8 | checkBadSortPagination, | 8 | checkBadSortPagination, |
9 | checkBadStartPagination | 9 | checkBadStartPagination |
10 | } from '../../../../shared/utils/requests/check-api-params' | 10 | } from '../../../../shared/extra-utils/requests/check-api-params' |
11 | import { getAccount } from '../../../../shared/utils/users/accounts' | 11 | import { getAccount } from '../../../../shared/extra-utils/users/accounts' |
12 | 12 | ||
13 | describe('Test accounts API validators', function () { | 13 | describe('Test accounts API validators', function () { |
14 | const path = '/api/v1/accounts/' | 14 | const path = '/api/v1/accounts/' |
diff --git a/server/tests/api/check-params/blocklist.ts b/server/tests/api/check-params/blocklist.ts index 62a2c2a52..6c7351d38 100644 --- a/server/tests/api/check-params/blocklist.ts +++ b/server/tests/api/check-params/blocklist.ts | |||
@@ -13,12 +13,12 @@ import { | |||
13 | makePostBodyRequest, | 13 | makePostBodyRequest, |
14 | ServerInfo, | 14 | ServerInfo, |
15 | setAccessTokensToServers, userLogin | 15 | setAccessTokensToServers, userLogin |
16 | } from '../../../../shared/utils' | 16 | } from '../../../../shared/extra-utils' |
17 | import { | 17 | import { |
18 | checkBadCountPagination, | 18 | checkBadCountPagination, |
19 | checkBadSortPagination, | 19 | checkBadSortPagination, |
20 | checkBadStartPagination | 20 | checkBadStartPagination |
21 | } from '../../../../shared/utils/requests/check-api-params' | 21 | } from '../../../../shared/extra-utils/requests/check-api-params' |
22 | 22 | ||
23 | describe('Test blocklist API validators', function () { | 23 | describe('Test blocklist API validators', function () { |
24 | let servers: ServerInfo[] | 24 | let servers: ServerInfo[] |
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index 3bcb015d9..ba07552cf 100644 --- a/server/tests/api/check-params/config.ts +++ b/server/tests/api/check-params/config.ts | |||
@@ -7,7 +7,7 @@ import { CustomConfig } from '../../../../shared/models/server/custom-config.mod | |||
7 | import { | 7 | import { |
8 | createUser, flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePutBodyRequest, runServer, ServerInfo, | 8 | createUser, flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePutBodyRequest, runServer, ServerInfo, |
9 | setAccessTokensToServers, userLogin, immutableAssign | 9 | setAccessTokensToServers, userLogin, immutableAssign |
10 | } from '../../../../shared/utils' | 10 | } from '../../../../shared/extra-utils' |
11 | 11 | ||
12 | describe('Test config API validators', function () { | 12 | describe('Test config API validators', function () { |
13 | const path = '/api/v1/config/custom' | 13 | const path = '/api/v1/config/custom' |
diff --git a/server/tests/api/check-params/contact-form.ts b/server/tests/api/check-params/contact-form.ts index c7e014b1f..9ba6136aa 100644 --- a/server/tests/api/check-params/contact-form.ts +++ b/server/tests/api/check-params/contact-form.ts | |||
@@ -10,15 +10,15 @@ import { | |||
10 | runServer, | 10 | runServer, |
11 | ServerInfo, | 11 | ServerInfo, |
12 | setAccessTokensToServers | 12 | setAccessTokensToServers |
13 | } from '../../../../shared/utils' | 13 | } from '../../../../shared/extra-utils' |
14 | import { | 14 | import { |
15 | checkBadCountPagination, | 15 | checkBadCountPagination, |
16 | checkBadSortPagination, | 16 | checkBadSortPagination, |
17 | checkBadStartPagination | 17 | checkBadStartPagination |
18 | } from '../../../../shared/utils/requests/check-api-params' | 18 | } from '../../../../shared/extra-utils/requests/check-api-params' |
19 | import { getAccount } from '../../../../shared/utils/users/accounts' | 19 | import { getAccount } from '../../../../shared/extra-utils/users/accounts' |
20 | import { sendContactForm } from '../../../../shared/utils/server/contact-form' | 20 | import { sendContactForm } from '../../../../shared/extra-utils/server/contact-form' |
21 | import { MockSmtpServer } from '../../../../shared/utils/miscs/email' | 21 | import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' |
22 | 22 | ||
23 | describe('Test contact form API validators', function () { | 23 | describe('Test contact form API validators', function () { |
24 | let server: ServerInfo | 24 | let server: ServerInfo |
diff --git a/server/tests/api/check-params/debug.ts b/server/tests/api/check-params/debug.ts index da94beffe..8ba7e0430 100644 --- a/server/tests/api/check-params/debug.ts +++ b/server/tests/api/check-params/debug.ts | |||
@@ -10,8 +10,8 @@ import { | |||
10 | ServerInfo, | 10 | ServerInfo, |
11 | setAccessTokensToServers, | 11 | setAccessTokensToServers, |
12 | userLogin | 12 | userLogin |
13 | } from '../../../../shared/utils' | 13 | } from '../../../../shared/extra-utils' |
14 | import { makeGetRequest } from '../../../../shared/utils/requests/requests' | 14 | import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests' |
15 | 15 | ||
16 | describe('Test debug API validators', function () { | 16 | describe('Test debug API validators', function () { |
17 | const path = '/api/v1/server/debug' | 17 | const path = '/api/v1/server/debug' |
diff --git a/server/tests/api/check-params/follows.ts b/server/tests/api/check-params/follows.ts index 5bb337682..e75631312 100644 --- a/server/tests/api/check-params/follows.ts +++ b/server/tests/api/check-params/follows.ts | |||
@@ -5,12 +5,12 @@ import 'mocha' | |||
5 | import { | 5 | import { |
6 | createUser, flushTests, killallServers, makeDeleteRequest, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers, | 6 | createUser, flushTests, killallServers, makeDeleteRequest, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers, |
7 | userLogin | 7 | userLogin |
8 | } from '../../../../shared/utils' | 8 | } from '../../../../shared/extra-utils' |
9 | import { | 9 | import { |
10 | checkBadCountPagination, | 10 | checkBadCountPagination, |
11 | checkBadSortPagination, | 11 | checkBadSortPagination, |
12 | checkBadStartPagination | 12 | checkBadStartPagination |
13 | } from '../../../../shared/utils/requests/check-api-params' | 13 | } from '../../../../shared/extra-utils/requests/check-api-params' |
14 | 14 | ||
15 | describe('Test server follows API validators', function () { | 15 | describe('Test server follows API validators', function () { |
16 | let server: ServerInfo | 16 | let server: ServerInfo |
diff --git a/server/tests/api/check-params/jobs.ts b/server/tests/api/check-params/jobs.ts index 5fb2b9606..682406e87 100644 --- a/server/tests/api/check-params/jobs.ts +++ b/server/tests/api/check-params/jobs.ts | |||
@@ -10,13 +10,13 @@ import { | |||
10 | ServerInfo, | 10 | ServerInfo, |
11 | setAccessTokensToServers, | 11 | setAccessTokensToServers, |
12 | userLogin | 12 | userLogin |
13 | } from '../../../../shared/utils' | 13 | } from '../../../../shared/extra-utils' |
14 | import { | 14 | import { |
15 | checkBadCountPagination, | 15 | checkBadCountPagination, |
16 | checkBadSortPagination, | 16 | checkBadSortPagination, |
17 | checkBadStartPagination | 17 | checkBadStartPagination |
18 | } from '../../../../shared/utils/requests/check-api-params' | 18 | } from '../../../../shared/extra-utils/requests/check-api-params' |
19 | import { makeGetRequest } from '../../../../shared/utils/requests/requests' | 19 | import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests' |
20 | 20 | ||
21 | describe('Test jobs API validators', function () { | 21 | describe('Test jobs API validators', function () { |
22 | const path = '/api/v1/jobs/failed' | 22 | const path = '/api/v1/jobs/failed' |
diff --git a/server/tests/api/check-params/logs.ts b/server/tests/api/check-params/logs.ts index 9bc6ac244..0948f7c5e 100644 --- a/server/tests/api/check-params/logs.ts +++ b/server/tests/api/check-params/logs.ts | |||
@@ -10,8 +10,8 @@ import { | |||
10 | ServerInfo, | 10 | ServerInfo, |
11 | setAccessTokensToServers, | 11 | setAccessTokensToServers, |
12 | userLogin | 12 | userLogin |
13 | } from '../../../../shared/utils' | 13 | } from '../../../../shared/extra-utils' |
14 | import { makeGetRequest } from '../../../../shared/utils/requests/requests' | 14 | import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests' |
15 | 15 | ||
16 | describe('Test logs API validators', function () { | 16 | describe('Test logs API validators', function () { |
17 | const path = '/api/v1/server/logs' | 17 | const path = '/api/v1/server/logs' |
diff --git a/server/tests/api/check-params/redundancy.ts b/server/tests/api/check-params/redundancy.ts index d14e35cf2..93b905fea 100644 --- a/server/tests/api/check-params/redundancy.ts +++ b/server/tests/api/check-params/redundancy.ts | |||
@@ -12,7 +12,7 @@ import { | |||
12 | ServerInfo, | 12 | ServerInfo, |
13 | setAccessTokensToServers, | 13 | setAccessTokensToServers, |
14 | userLogin | 14 | userLogin |
15 | } from '../../../../shared/utils' | 15 | } from '../../../../shared/extra-utils' |
16 | 16 | ||
17 | describe('Test server redundancy API validators', function () { | 17 | describe('Test server redundancy API validators', function () { |
18 | let servers: ServerInfo[] | 18 | let servers: ServerInfo[] |
diff --git a/server/tests/api/check-params/search.ts b/server/tests/api/check-params/search.ts index 7b7e07784..1fcdedd90 100644 --- a/server/tests/api/check-params/search.ts +++ b/server/tests/api/check-params/search.ts | |||
@@ -2,12 +2,12 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | 4 | ||
5 | import { flushTests, immutableAssign, killallServers, makeGetRequest, runServer, ServerInfo } from '../../../../shared/utils' | 5 | import { flushTests, immutableAssign, killallServers, makeGetRequest, runServer, ServerInfo } from '../../../../shared/extra-utils' |
6 | import { | 6 | import { |
7 | checkBadCountPagination, | 7 | checkBadCountPagination, |
8 | checkBadSortPagination, | 8 | checkBadSortPagination, |
9 | checkBadStartPagination | 9 | checkBadStartPagination |
10 | } from '../../../../shared/utils/requests/check-api-params' | 10 | } from '../../../../shared/extra-utils/requests/check-api-params' |
11 | 11 | ||
12 | describe('Test videos API validator', function () { | 12 | describe('Test videos API validator', function () { |
13 | let server: ServerInfo | 13 | let server: ServerInfo |
diff --git a/server/tests/api/check-params/services.ts b/server/tests/api/check-params/services.ts index 28591af9d..813bc7e36 100644 --- a/server/tests/api/check-params/services.ts +++ b/server/tests/api/check-params/services.ts | |||
@@ -10,7 +10,7 @@ import { | |||
10 | ServerInfo, | 10 | ServerInfo, |
11 | setAccessTokensToServers, | 11 | setAccessTokensToServers, |
12 | uploadVideo | 12 | uploadVideo |
13 | } from '../../../../shared/utils' | 13 | } from '../../../../shared/extra-utils' |
14 | 14 | ||
15 | describe('Test services API validators', function () { | 15 | describe('Test services API validators', function () { |
16 | let server: ServerInfo | 16 | let server: ServerInfo |
diff --git a/server/tests/api/check-params/user-notifications.ts b/server/tests/api/check-params/user-notifications.ts index 4b75f6920..c56328406 100644 --- a/server/tests/api/check-params/user-notifications.ts +++ b/server/tests/api/check-params/user-notifications.ts | |||
@@ -14,12 +14,12 @@ import { | |||
14 | ServerInfo, | 14 | ServerInfo, |
15 | setAccessTokensToServers, | 15 | setAccessTokensToServers, |
16 | wait | 16 | wait |
17 | } from '../../../../shared/utils' | 17 | } from '../../../../shared/extra-utils' |
18 | import { | 18 | import { |
19 | checkBadCountPagination, | 19 | checkBadCountPagination, |
20 | checkBadSortPagination, | 20 | checkBadSortPagination, |
21 | checkBadStartPagination | 21 | checkBadStartPagination |
22 | } from '../../../../shared/utils/requests/check-api-params' | 22 | } from '../../../../shared/extra-utils/requests/check-api-params' |
23 | import { UserNotificationSetting, UserNotificationSettingValue } from '../../../../shared/models/users' | 23 | import { UserNotificationSetting, UserNotificationSettingValue } from '../../../../shared/models/users' |
24 | 24 | ||
25 | describe('Test user notifications API validators', function () { | 25 | describe('Test user notifications API validators', function () { |
diff --git a/server/tests/api/check-params/user-subscriptions.ts b/server/tests/api/check-params/user-subscriptions.ts index a18e1a43b..d33b3bca6 100644 --- a/server/tests/api/check-params/user-subscriptions.ts +++ b/server/tests/api/check-params/user-subscriptions.ts | |||
@@ -13,14 +13,14 @@ import { | |||
13 | ServerInfo, | 13 | ServerInfo, |
14 | setAccessTokensToServers, | 14 | setAccessTokensToServers, |
15 | userLogin | 15 | userLogin |
16 | } from '../../../../shared/utils' | 16 | } from '../../../../shared/extra-utils' |
17 | 17 | ||
18 | import { | 18 | import { |
19 | checkBadCountPagination, | 19 | checkBadCountPagination, |
20 | checkBadSortPagination, | 20 | checkBadSortPagination, |
21 | checkBadStartPagination | 21 | checkBadStartPagination |
22 | } from '../../../../shared/utils/requests/check-api-params' | 22 | } from '../../../../shared/extra-utils/requests/check-api-params' |
23 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 23 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
24 | 24 | ||
25 | describe('Test user subscriptions API validators', function () { | 25 | describe('Test user subscriptions API validators', function () { |
26 | const path = '/api/v1/users/me/subscriptions' | 26 | const path = '/api/v1/users/me/subscriptions' |
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts index b5c812e8f..b62806554 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts | |||
@@ -9,15 +9,15 @@ import { | |||
9 | createUser, flushTests, getMyUserInformation, getMyUserVideoRating, getUsersList, immutableAssign, killallServers, makeGetRequest, | 9 | createUser, flushTests, getMyUserInformation, getMyUserVideoRating, getUsersList, immutableAssign, killallServers, makeGetRequest, |
10 | makePostBodyRequest, makeUploadRequest, makePutBodyRequest, registerUser, removeUser, runServer, ServerInfo, setAccessTokensToServers, | 10 | makePostBodyRequest, makeUploadRequest, makePutBodyRequest, registerUser, removeUser, runServer, ServerInfo, setAccessTokensToServers, |
11 | updateUser, uploadVideo, userLogin, deleteMe, unblockUser, blockUser | 11 | updateUser, uploadVideo, userLogin, deleteMe, unblockUser, blockUser |
12 | } from '../../../../shared/utils' | 12 | } from '../../../../shared/extra-utils' |
13 | import { | 13 | import { |
14 | checkBadCountPagination, | 14 | checkBadCountPagination, |
15 | checkBadSortPagination, | 15 | checkBadSortPagination, |
16 | checkBadStartPagination | 16 | checkBadStartPagination |
17 | } from '../../../../shared/utils/requests/check-api-params' | 17 | } from '../../../../shared/extra-utils/requests/check-api-params' |
18 | import { getMagnetURI, getMyVideoImports, getYoutubeVideoUrl, importVideo } from '../../../../shared/utils/videos/video-imports' | 18 | import { getMagnetURI, getMyVideoImports, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' |
19 | import { VideoPrivacy } from '../../../../shared/models/videos' | 19 | import { VideoPrivacy } from '../../../../shared/models/videos' |
20 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 20 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
21 | import { expect } from 'chai' | 21 | import { expect } from 'chai' |
22 | import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' | 22 | import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' |
23 | 23 | ||
diff --git a/server/tests/api/check-params/video-abuses.ts b/server/tests/api/check-params/video-abuses.ts index 7edc8e39d..78e4acf2f 100644 --- a/server/tests/api/check-params/video-abuses.ts +++ b/server/tests/api/check-params/video-abuses.ts | |||
@@ -15,12 +15,12 @@ import { | |||
15 | updateVideoAbuse, | 15 | updateVideoAbuse, |
16 | uploadVideo, | 16 | uploadVideo, |
17 | userLogin | 17 | userLogin |
18 | } from '../../../../shared/utils' | 18 | } from '../../../../shared/extra-utils' |
19 | import { | 19 | import { |
20 | checkBadCountPagination, | 20 | checkBadCountPagination, |
21 | checkBadSortPagination, | 21 | checkBadSortPagination, |
22 | checkBadStartPagination | 22 | checkBadStartPagination |
23 | } from '../../../../shared/utils/requests/check-api-params' | 23 | } from '../../../../shared/extra-utils/requests/check-api-params' |
24 | import { VideoAbuseState } from '../../../../shared/models/videos' | 24 | import { VideoAbuseState } from '../../../../shared/models/videos' |
25 | 25 | ||
26 | describe('Test video abuses API validators', function () { | 26 | describe('Test video abuses API validators', function () { |
diff --git a/server/tests/api/check-params/video-blacklist.ts b/server/tests/api/check-params/video-blacklist.ts index 81423aee9..c2e9622cc 100644 --- a/server/tests/api/check-params/video-blacklist.ts +++ b/server/tests/api/check-params/video-blacklist.ts | |||
@@ -18,12 +18,12 @@ import { | |||
18 | setAccessTokensToServers, | 18 | setAccessTokensToServers, |
19 | uploadVideo, | 19 | uploadVideo, |
20 | userLogin, waitJobs | 20 | userLogin, waitJobs |
21 | } from '../../../../shared/utils' | 21 | } from '../../../../shared/extra-utils' |
22 | import { | 22 | import { |
23 | checkBadCountPagination, | 23 | checkBadCountPagination, |
24 | checkBadSortPagination, | 24 | checkBadSortPagination, |
25 | checkBadStartPagination | 25 | checkBadStartPagination |
26 | } from '../../../../shared/utils/requests/check-api-params' | 26 | } from '../../../../shared/extra-utils/requests/check-api-params' |
27 | import { VideoDetails, VideoBlacklistType } from '../../../../shared/models/videos' | 27 | import { VideoDetails, VideoBlacklistType } from '../../../../shared/models/videos' |
28 | import { expect } from 'chai' | 28 | import { expect } from 'chai' |
29 | 29 | ||
diff --git a/server/tests/api/check-params/video-captions.ts b/server/tests/api/check-params/video-captions.ts index de2ca8cd1..4ef5e03ed 100644 --- a/server/tests/api/check-params/video-captions.ts +++ b/server/tests/api/check-params/video-captions.ts | |||
@@ -13,9 +13,9 @@ import { | |||
13 | setAccessTokensToServers, | 13 | setAccessTokensToServers, |
14 | uploadVideo, | 14 | uploadVideo, |
15 | userLogin | 15 | userLogin |
16 | } from '../../../../shared/utils' | 16 | } from '../../../../shared/extra-utils' |
17 | import { join } from 'path' | 17 | import { join } from 'path' |
18 | import { createVideoCaption } from '../../../../shared/utils/videos/video-captions' | 18 | import { createVideoCaption } from '../../../../shared/extra-utils/videos/video-captions' |
19 | 19 | ||
20 | describe('Test video captions API validator', function () { | 20 | describe('Test video captions API validator', function () { |
21 | const path = '/api/v1/videos/' | 21 | const path = '/api/v1/videos/' |
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts index b72fc4220..b6aa745ab 100644 --- a/server/tests/api/check-params/video-channels.ts +++ b/server/tests/api/check-params/video-channels.ts | |||
@@ -20,12 +20,12 @@ import { | |||
20 | ServerInfo, | 20 | ServerInfo, |
21 | setAccessTokensToServers, | 21 | setAccessTokensToServers, |
22 | userLogin | 22 | userLogin |
23 | } from '../../../../shared/utils' | 23 | } from '../../../../shared/extra-utils' |
24 | import { | 24 | import { |
25 | checkBadCountPagination, | 25 | checkBadCountPagination, |
26 | checkBadSortPagination, | 26 | checkBadSortPagination, |
27 | checkBadStartPagination | 27 | checkBadStartPagination |
28 | } from '../../../../shared/utils/requests/check-api-params' | 28 | } from '../../../../shared/extra-utils/requests/check-api-params' |
29 | import { User } from '../../../../shared/models/users' | 29 | import { User } from '../../../../shared/models/users' |
30 | import { join } from 'path' | 30 | import { join } from 'path' |
31 | 31 | ||
diff --git a/server/tests/api/check-params/video-comments.ts b/server/tests/api/check-params/video-comments.ts index 5f70998ef..b80d91279 100644 --- a/server/tests/api/check-params/video-comments.ts +++ b/server/tests/api/check-params/video-comments.ts | |||
@@ -6,13 +6,13 @@ import { | |||
6 | createUser, | 6 | createUser, |
7 | flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers, | 7 | flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers, |
8 | uploadVideo, userLogin | 8 | uploadVideo, userLogin |
9 | } from '../../../../shared/utils' | 9 | } from '../../../../shared/extra-utils' |
10 | import { | 10 | import { |
11 | checkBadCountPagination, | 11 | checkBadCountPagination, |
12 | checkBadSortPagination, | 12 | checkBadSortPagination, |
13 | checkBadStartPagination | 13 | checkBadStartPagination |
14 | } from '../../../../shared/utils/requests/check-api-params' | 14 | } from '../../../../shared/extra-utils/requests/check-api-params' |
15 | import { addVideoCommentThread } from '../../../../shared/utils/videos/video-comments' | 15 | import { addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments' |
16 | 16 | ||
17 | const expect = chai.expect | 17 | const expect = chai.expect |
18 | 18 | ||
diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts index 4d2bf2e8d..ad4c4def0 100644 --- a/server/tests/api/check-params/video-imports.ts +++ b/server/tests/api/check-params/video-imports.ts | |||
@@ -18,13 +18,13 @@ import { | |||
18 | setAccessTokensToServers, | 18 | setAccessTokensToServers, |
19 | updateCustomSubConfig, | 19 | updateCustomSubConfig, |
20 | userLogin | 20 | userLogin |
21 | } from '../../../../shared/utils' | 21 | } from '../../../../shared/extra-utils' |
22 | import { | 22 | import { |
23 | checkBadCountPagination, | 23 | checkBadCountPagination, |
24 | checkBadSortPagination, | 24 | checkBadSortPagination, |
25 | checkBadStartPagination | 25 | checkBadStartPagination |
26 | } from '../../../../shared/utils/requests/check-api-params' | 26 | } from '../../../../shared/extra-utils/requests/check-api-params' |
27 | import { getMagnetURI, getYoutubeVideoUrl } from '../../../../shared/utils/videos/video-imports' | 27 | import { getMagnetURI, getYoutubeVideoUrl } from '../../../../shared/extra-utils/videos/video-imports' |
28 | 28 | ||
29 | describe('Test video imports API validator', function () { | 29 | describe('Test video imports API validator', function () { |
30 | const path = '/api/v1/videos/imports' | 30 | const path = '/api/v1/videos/imports' |
diff --git a/server/tests/api/check-params/video-playlists.ts b/server/tests/api/check-params/video-playlists.ts index 229c23118..0f3484763 100644 --- a/server/tests/api/check-params/video-playlists.ts +++ b/server/tests/api/check-params/video-playlists.ts | |||
@@ -20,12 +20,12 @@ import { | |||
20 | updateVideoPlaylist, | 20 | updateVideoPlaylist, |
21 | updateVideoPlaylistElement, | 21 | updateVideoPlaylistElement, |
22 | uploadVideoAndGetId | 22 | uploadVideoAndGetId |
23 | } from '../../../../shared/utils' | 23 | } from '../../../../shared/extra-utils' |
24 | import { | 24 | import { |
25 | checkBadCountPagination, | 25 | checkBadCountPagination, |
26 | checkBadSortPagination, | 26 | checkBadSortPagination, |
27 | checkBadStartPagination | 27 | checkBadStartPagination |
28 | } from '../../../../shared/utils/requests/check-api-params' | 28 | } from '../../../../shared/extra-utils/requests/check-api-params' |
29 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' | 29 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' |
30 | import { VideoPlaylistType } from '../../../../shared/models/videos/playlist/video-playlist-type.model' | 30 | import { VideoPlaylistType } from '../../../../shared/models/videos/playlist/video-playlist-type.model' |
31 | 31 | ||
diff --git a/server/tests/api/check-params/videos-filter.ts b/server/tests/api/check-params/videos-filter.ts index 7c487ae81..971867b27 100644 --- a/server/tests/api/check-params/videos-filter.ts +++ b/server/tests/api/check-params/videos-filter.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | ServerInfo, | 11 | ServerInfo, |
12 | setAccessTokensToServers, setDefaultVideoChannel, | 12 | setAccessTokensToServers, setDefaultVideoChannel, |
13 | userLogin | 13 | userLogin |
14 | } from '../../../../shared/utils' | 14 | } from '../../../../shared/extra-utils' |
15 | import { UserRole } from '../../../../shared/models/users' | 15 | import { UserRole } from '../../../../shared/models/users' |
16 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' | 16 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' |
17 | 17 | ||
diff --git a/server/tests/api/check-params/videos-history.ts b/server/tests/api/check-params/videos-history.ts index 8c079a956..11e277644 100644 --- a/server/tests/api/check-params/videos-history.ts +++ b/server/tests/api/check-params/videos-history.ts | |||
@@ -14,7 +14,7 @@ import { | |||
14 | ServerInfo, | 14 | ServerInfo, |
15 | setAccessTokensToServers, | 15 | setAccessTokensToServers, |
16 | uploadVideo | 16 | uploadVideo |
17 | } from '../../../../shared/utils' | 17 | } from '../../../../shared/extra-utils' |
18 | 18 | ||
19 | const expect = chai.expect | 19 | const expect = chai.expect |
20 | 20 | ||
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts index 3f0e0d646..e96f324cc 100644 --- a/server/tests/api/check-params/videos.ts +++ b/server/tests/api/check-params/videos.ts | |||
@@ -9,13 +9,13 @@ import { | |||
9 | createUser, flushTests, getMyUserInformation, getVideo, getVideosList, immutableAssign, killallServers, makeDeleteRequest, | 9 | createUser, flushTests, getMyUserInformation, getVideo, getVideosList, immutableAssign, killallServers, makeDeleteRequest, |
10 | makeGetRequest, makeUploadRequest, makePutBodyRequest, removeVideo, uploadVideo, | 10 | makeGetRequest, makeUploadRequest, makePutBodyRequest, removeVideo, uploadVideo, |
11 | runServer, ServerInfo, setAccessTokensToServers, userLogin, updateCustomSubConfig | 11 | runServer, ServerInfo, setAccessTokensToServers, userLogin, updateCustomSubConfig |
12 | } from '../../../../shared/utils' | 12 | } from '../../../../shared/extra-utils' |
13 | import { | 13 | import { |
14 | checkBadCountPagination, | 14 | checkBadCountPagination, |
15 | checkBadSortPagination, | 15 | checkBadSortPagination, |
16 | checkBadStartPagination | 16 | checkBadStartPagination |
17 | } from '../../../../shared/utils/requests/check-api-params' | 17 | } from '../../../../shared/extra-utils/requests/check-api-params' |
18 | import { getAccountsList } from '../../../../shared/utils/users/accounts' | 18 | import { getAccountsList } from '../../../../shared/extra-utils/users/accounts' |
19 | 19 | ||
20 | const expect = chai.expect | 20 | const expect = chai.expect |
21 | 21 | ||
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts index d1d6f3c35..8f7ce82a4 100644 --- a/server/tests/api/notifications/user-notifications.ts +++ b/server/tests/api/notifications/user-notifications.ts | |||
@@ -20,11 +20,11 @@ import { | |||
20 | wait, | 20 | wait, |
21 | getCustomConfig, | 21 | getCustomConfig, |
22 | updateCustomConfig, getVideoThreadComments, getVideoCommentThreads, follow | 22 | updateCustomConfig, getVideoThreadComments, getVideoCommentThreads, follow |
23 | } from '../../../../shared/utils' | 23 | } from '../../../../shared/extra-utils' |
24 | import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/utils/index' | 24 | import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/extra-utils/index' |
25 | import { setAccessTokensToServers } from '../../../../shared/utils/users/login' | 25 | import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' |
26 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 26 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
27 | import { getUserNotificationSocket } from '../../../../shared/utils/socket/socket-io' | 27 | import { getUserNotificationSocket } from '../../../../shared/extra-utils/socket/socket-io' |
28 | import { | 28 | import { |
29 | checkCommentMention, | 29 | checkCommentMention, |
30 | CheckerBaseParams, | 30 | CheckerBaseParams, |
@@ -42,7 +42,7 @@ import { | |||
42 | markAsReadNotifications, | 42 | markAsReadNotifications, |
43 | updateMyNotificationSettings, | 43 | updateMyNotificationSettings, |
44 | markAsReadAllNotifications, checkNewInstanceFollower | 44 | markAsReadAllNotifications, checkNewInstanceFollower |
45 | } from '../../../../shared/utils/users/user-notifications' | 45 | } from '../../../../shared/extra-utils/users/user-notifications' |
46 | import { | 46 | import { |
47 | User, | 47 | User, |
48 | UserNotification, | 48 | UserNotification, |
@@ -50,13 +50,13 @@ import { | |||
50 | UserNotificationSettingValue, | 50 | UserNotificationSettingValue, |
51 | UserNotificationType | 51 | UserNotificationType |
52 | } from '../../../../shared/models/users' | 52 | } from '../../../../shared/models/users' |
53 | import { MockSmtpServer } from '../../../../shared/utils/miscs/email' | 53 | import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' |
54 | import { addUserSubscription, removeUserSubscription } from '../../../../shared/utils/users/user-subscriptions' | 54 | import { addUserSubscription, removeUserSubscription } from '../../../../shared/extra-utils/users/user-subscriptions' |
55 | import { VideoPrivacy } from '../../../../shared/models/videos' | 55 | import { VideoPrivacy } from '../../../../shared/models/videos' |
56 | import { getBadVideoUrl, getYoutubeVideoUrl, importVideo } from '../../../../shared/utils/videos/video-imports' | 56 | import { getBadVideoUrl, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' |
57 | import { addVideoCommentReply, addVideoCommentThread } from '../../../../shared/utils/videos/video-comments' | 57 | import { addVideoCommentReply, addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments' |
58 | import * as uuidv4 from 'uuid/v4' | 58 | import * as uuidv4 from 'uuid/v4' |
59 | import { addAccountToAccountBlocklist, removeAccountFromAccountBlocklist } from '../../../../shared/utils/users/blocklist' | 59 | import { addAccountToAccountBlocklist, removeAccountFromAccountBlocklist } from '../../../../shared/extra-utils/users/blocklist' |
60 | import { CustomConfig } from '../../../../shared/models/server' | 60 | import { CustomConfig } from '../../../../shared/models/server' |
61 | import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' | 61 | import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' |
62 | 62 | ||
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts index 33921763d..280a4c64b 100644 --- a/server/tests/api/redundancy/redundancy.ts +++ b/server/tests/api/redundancy/redundancy.ts | |||
@@ -24,16 +24,16 @@ import { | |||
24 | viewVideo, | 24 | viewVideo, |
25 | wait, | 25 | wait, |
26 | waitUntilLog | 26 | waitUntilLog |
27 | } from '../../../../shared/utils' | 27 | } from '../../../../shared/extra-utils' |
28 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 28 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
29 | 29 | ||
30 | import * as magnetUtil from 'magnet-uri' | 30 | import * as magnetUtil from 'magnet-uri' |
31 | import { updateRedundancy } from '../../../../shared/utils/server/redundancy' | 31 | import { updateRedundancy } from '../../../../shared/extra-utils/server/redundancy' |
32 | import { ActorFollow } from '../../../../shared/models/actors' | 32 | import { ActorFollow } from '../../../../shared/models/actors' |
33 | import { readdir } from 'fs-extra' | 33 | import { readdir } from 'fs-extra' |
34 | import { join } from 'path' | 34 | import { join } from 'path' |
35 | import { VideoRedundancyStrategy } from '../../../../shared/models/redundancy' | 35 | import { VideoRedundancyStrategy } from '../../../../shared/models/redundancy' |
36 | import { getStats } from '../../../../shared/utils/server/stats' | 36 | import { getStats } from '../../../../shared/extra-utils/server/stats' |
37 | import { ServerStats } from '../../../../shared/models/server/server-stats.model' | 37 | import { ServerStats } from '../../../../shared/models/server/server-stats.model' |
38 | 38 | ||
39 | const expect = chai.expect | 39 | const expect = chai.expect |
diff --git a/server/tests/api/search/search-activitypub-video-channels.ts b/server/tests/api/search/search-activitypub-video-channels.ts index 682bd262a..1f59a951b 100644 --- a/server/tests/api/search/search-activitypub-video-channels.ts +++ b/server/tests/api/search/search-activitypub-video-channels.ts | |||
@@ -17,10 +17,10 @@ import { | |||
17 | uploadVideo, | 17 | uploadVideo, |
18 | userLogin, | 18 | userLogin, |
19 | wait | 19 | wait |
20 | } from '../../../../shared/utils' | 20 | } from '../../../../shared/extra-utils' |
21 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 21 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
22 | import { VideoChannel } from '../../../../shared/models/videos' | 22 | import { VideoChannel } from '../../../../shared/models/videos' |
23 | import { searchVideoChannel } from '../../../../shared/utils/search/video-channels' | 23 | import { searchVideoChannel } from '../../../../shared/extra-utils/search/video-channels' |
24 | 24 | ||
25 | const expect = chai.expect | 25 | const expect = chai.expect |
26 | 26 | ||
diff --git a/server/tests/api/search/search-activitypub-videos.ts b/server/tests/api/search/search-activitypub-videos.ts index f881917e7..d984c696c 100644 --- a/server/tests/api/search/search-activitypub-videos.ts +++ b/server/tests/api/search/search-activitypub-videos.ts | |||
@@ -16,8 +16,8 @@ import { | |||
16 | uploadVideo, | 16 | uploadVideo, |
17 | wait, | 17 | wait, |
18 | searchVideo | 18 | searchVideo |
19 | } from '../../../../shared/utils' | 19 | } from '../../../../shared/extra-utils' |
20 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 20 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
21 | import { Video, VideoPrivacy } from '../../../../shared/models/videos' | 21 | import { Video, VideoPrivacy } from '../../../../shared/models/videos' |
22 | 22 | ||
23 | const expect = chai.expect | 23 | const expect = chai.expect |
diff --git a/server/tests/api/search/search-videos.ts b/server/tests/api/search/search-videos.ts index fa4078b99..65f3c9186 100644 --- a/server/tests/api/search/search-videos.ts +++ b/server/tests/api/search/search-videos.ts | |||
@@ -13,7 +13,7 @@ import { | |||
13 | uploadVideo, | 13 | uploadVideo, |
14 | wait, | 14 | wait, |
15 | immutableAssign | 15 | immutableAssign |
16 | } from '../../../../shared/utils' | 16 | } from '../../../../shared/extra-utils' |
17 | 17 | ||
18 | const expect = chai.expect | 18 | const expect = chai.expect |
19 | 19 | ||
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index 5373d02f2..a99916627 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts | |||
@@ -16,7 +16,7 @@ import { | |||
16 | runServer, | 16 | runServer, |
17 | setAccessTokensToServers, | 17 | setAccessTokensToServers, |
18 | updateCustomConfig | 18 | updateCustomConfig |
19 | } from '../../../../shared/utils' | 19 | } from '../../../../shared/extra-utils' |
20 | import { ServerConfig } from '../../../../shared/models' | 20 | import { ServerConfig } from '../../../../shared/models' |
21 | 21 | ||
22 | const expect = chai.expect | 22 | const expect = chai.expect |
diff --git a/server/tests/api/server/contact-form.ts b/server/tests/api/server/contact-form.ts index 06a2f89b0..fdd5e9730 100644 --- a/server/tests/api/server/contact-form.ts +++ b/server/tests/api/server/contact-form.ts | |||
@@ -2,10 +2,10 @@ | |||
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, wait } from '../../../../shared/utils' | 5 | import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, wait } from '../../../../shared/extra-utils' |
6 | import { MockSmtpServer } from '../../../../shared/utils/miscs/email' | 6 | import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' |
7 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 7 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
8 | import { sendContactForm } from '../../../../shared/utils/server/contact-form' | 8 | import { sendContactForm } from '../../../../shared/extra-utils/server/contact-form' |
9 | 9 | ||
10 | const expect = chai.expect | 10 | const expect = chai.expect |
11 | 11 | ||
diff --git a/server/tests/api/server/email.ts b/server/tests/api/server/email.ts index bc45102d2..a40a281f8 100644 --- a/server/tests/api/server/email.ts +++ b/server/tests/api/server/email.ts | |||
@@ -19,9 +19,9 @@ import { | |||
19 | killallServers, | 19 | killallServers, |
20 | ServerInfo, | 20 | ServerInfo, |
21 | setAccessTokensToServers | 21 | setAccessTokensToServers |
22 | } from '../../../../shared/utils' | 22 | } from '../../../../shared/extra-utils' |
23 | import { MockSmtpServer } from '../../../../shared/utils/miscs/email' | 23 | import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' |
24 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 24 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
25 | 25 | ||
26 | const expect = chai.expect | 26 | const expect = chai.expect |
27 | 27 | ||
diff --git a/server/tests/api/server/follow-constraints.ts b/server/tests/api/server/follow-constraints.ts index 28862a1c6..bdd8b1c70 100644 --- a/server/tests/api/server/follow-constraints.ts +++ b/server/tests/api/server/follow-constraints.ts | |||
@@ -13,10 +13,10 @@ import { | |||
13 | ServerInfo, | 13 | ServerInfo, |
14 | setAccessTokensToServers, | 14 | setAccessTokensToServers, |
15 | uploadVideo | 15 | uploadVideo |
16 | } from '../../../../shared/utils' | 16 | } from '../../../../shared/extra-utils' |
17 | import { unfollow } from '../../../../shared/utils/server/follows' | 17 | import { unfollow } from '../../../../shared/extra-utils/server/follows' |
18 | import { userLogin } from '../../../../shared/utils/users/login' | 18 | import { userLogin } from '../../../../shared/extra-utils/users/login' |
19 | import { createUser } from '../../../../shared/utils/users/users' | 19 | import { createUser } from '../../../../shared/extra-utils/users/users' |
20 | 20 | ||
21 | const expect = chai.expect | 21 | const expect = chai.expect |
22 | 22 | ||
diff --git a/server/tests/api/server/follows-moderation.ts b/server/tests/api/server/follows-moderation.ts index 0bb3aa866..f4a826ea8 100644 --- a/server/tests/api/server/follows-moderation.ts +++ b/server/tests/api/server/follows-moderation.ts | |||
@@ -9,15 +9,15 @@ import { | |||
9 | ServerInfo, | 9 | ServerInfo, |
10 | setAccessTokensToServers, | 10 | setAccessTokensToServers, |
11 | updateCustomSubConfig | 11 | updateCustomSubConfig |
12 | } from '../../../../shared/utils/index' | 12 | } from '../../../../shared/extra-utils/index' |
13 | import { | 13 | import { |
14 | follow, | 14 | follow, |
15 | getFollowersListPaginationAndSort, | 15 | getFollowersListPaginationAndSort, |
16 | getFollowingListPaginationAndSort, | 16 | getFollowingListPaginationAndSort, |
17 | removeFollower, | 17 | removeFollower, |
18 | rejectFollower | 18 | rejectFollower |
19 | } from '../../../../shared/utils/server/follows' | 19 | } from '../../../../shared/extra-utils/server/follows' |
20 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 20 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
21 | import { ActorFollow } from '../../../../shared/models/actors' | 21 | import { ActorFollow } from '../../../../shared/models/actors' |
22 | 22 | ||
23 | const expect = chai.expect | 23 | const expect = chai.expect |
diff --git a/server/tests/api/server/follows.ts b/server/tests/api/server/follows.ts index a5e6c3c1e..527b54e1e 100644 --- a/server/tests/api/server/follows.ts +++ b/server/tests/api/server/follows.ts | |||
@@ -4,7 +4,7 @@ import * as chai from 'chai' | |||
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { Video, VideoPrivacy } from '../../../../shared/models/videos' | 5 | import { Video, VideoPrivacy } from '../../../../shared/models/videos' |
6 | import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' | 6 | import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' |
7 | import { completeVideoCheck } from '../../../../shared/utils' | 7 | import { completeVideoCheck } from '../../../../shared/extra-utils' |
8 | import { | 8 | import { |
9 | flushAndRunMultipleServers, | 9 | flushAndRunMultipleServers, |
10 | getVideosList, | 10 | getVideosList, |
@@ -12,26 +12,26 @@ import { | |||
12 | ServerInfo, | 12 | ServerInfo, |
13 | setAccessTokensToServers, | 13 | setAccessTokensToServers, |
14 | uploadVideo | 14 | uploadVideo |
15 | } from '../../../../shared/utils/index' | 15 | } from '../../../../shared/extra-utils/index' |
16 | import { dateIsValid } from '../../../../shared/utils/miscs/miscs' | 16 | import { dateIsValid } from '../../../../shared/extra-utils/miscs/miscs' |
17 | import { | 17 | import { |
18 | follow, | 18 | follow, |
19 | getFollowersListPaginationAndSort, | 19 | getFollowersListPaginationAndSort, |
20 | getFollowingListPaginationAndSort, | 20 | getFollowingListPaginationAndSort, |
21 | unfollow | 21 | unfollow |
22 | } from '../../../../shared/utils/server/follows' | 22 | } from '../../../../shared/extra-utils/server/follows' |
23 | import { expectAccountFollows } from '../../../../shared/utils/users/accounts' | 23 | import { expectAccountFollows } from '../../../../shared/extra-utils/users/accounts' |
24 | import { userLogin } from '../../../../shared/utils/users/login' | 24 | import { userLogin } from '../../../../shared/extra-utils/users/login' |
25 | import { createUser } from '../../../../shared/utils/users/users' | 25 | import { createUser } from '../../../../shared/extra-utils/users/users' |
26 | import { | 26 | import { |
27 | addVideoCommentReply, | 27 | addVideoCommentReply, |
28 | addVideoCommentThread, | 28 | addVideoCommentThread, |
29 | getVideoCommentThreads, | 29 | getVideoCommentThreads, |
30 | getVideoThreadComments | 30 | getVideoThreadComments |
31 | } from '../../../../shared/utils/videos/video-comments' | 31 | } from '../../../../shared/extra-utils/videos/video-comments' |
32 | import { rateVideo } from '../../../../shared/utils/videos/videos' | 32 | import { rateVideo } from '../../../../shared/extra-utils/videos/videos' |
33 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 33 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
34 | import { createVideoCaption, listVideoCaptions, testCaptionFile } from '../../../../shared/utils/videos/video-captions' | 34 | import { createVideoCaption, listVideoCaptions, testCaptionFile } from '../../../../shared/extra-utils/videos/video-captions' |
35 | import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model' | 35 | import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model' |
36 | 36 | ||
37 | const expect = chai.expect | 37 | const expect = chai.expect |
diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.ts index cd5acbe16..8c49541ee 100644 --- a/server/tests/api/server/handle-down.ts +++ b/server/tests/api/server/handle-down.ts | |||
@@ -20,15 +20,15 @@ import { | |||
20 | updateVideo, | 20 | updateVideo, |
21 | uploadVideo, | 21 | uploadVideo, |
22 | wait | 22 | wait |
23 | } from '../../../../shared/utils' | 23 | } from '../../../../shared/extra-utils' |
24 | import { follow, getFollowersListPaginationAndSort } from '../../../../shared/utils/server/follows' | 24 | import { follow, getFollowersListPaginationAndSort } from '../../../../shared/extra-utils/server/follows' |
25 | import { getJobsListPaginationAndSort, waitJobs } from '../../../../shared/utils/server/jobs' | 25 | import { getJobsListPaginationAndSort, waitJobs } from '../../../../shared/extra-utils/server/jobs' |
26 | import { | 26 | import { |
27 | addVideoCommentReply, | 27 | addVideoCommentReply, |
28 | addVideoCommentThread, | 28 | addVideoCommentThread, |
29 | getVideoCommentThreads, | 29 | getVideoCommentThreads, |
30 | getVideoThreadComments | 30 | getVideoThreadComments |
31 | } from '../../../../shared/utils/videos/video-comments' | 31 | } from '../../../../shared/extra-utils/videos/video-comments' |
32 | 32 | ||
33 | const expect = chai.expect | 33 | const expect = chai.expect |
34 | 34 | ||
diff --git a/server/tests/api/server/jobs.ts b/server/tests/api/server/jobs.ts index 52948b1d6..1d7429873 100644 --- a/server/tests/api/server/jobs.ts +++ b/server/tests/api/server/jobs.ts | |||
@@ -2,12 +2,12 @@ | |||
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/utils/index' | 5 | import { killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/extra-utils/index' |
6 | import { doubleFollow } from '../../../../shared/utils/server/follows' | 6 | import { doubleFollow } from '../../../../shared/extra-utils/server/follows' |
7 | import { getJobsList, getJobsListPaginationAndSort, waitJobs } from '../../../../shared/utils/server/jobs' | 7 | import { getJobsList, getJobsListPaginationAndSort, waitJobs } from '../../../../shared/extra-utils/server/jobs' |
8 | import { flushAndRunMultipleServers } from '../../../../shared/utils/server/servers' | 8 | import { flushAndRunMultipleServers } from '../../../../shared/extra-utils/server/servers' |
9 | import { uploadVideo } from '../../../../shared/utils/videos/videos' | 9 | import { uploadVideo } from '../../../../shared/extra-utils/videos/videos' |
10 | import { dateIsValid } from '../../../../shared/utils/miscs/miscs' | 10 | import { dateIsValid } from '../../../../shared/extra-utils/miscs/miscs' |
11 | 11 | ||
12 | const expect = chai.expect | 12 | const expect = chai.expect |
13 | 13 | ||
diff --git a/server/tests/api/server/logs.ts b/server/tests/api/server/logs.ts index 05b0308de..f55e12407 100644 --- a/server/tests/api/server/logs.ts +++ b/server/tests/api/server/logs.ts | |||
@@ -2,10 +2,10 @@ | |||
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers } from '../../../../shared/utils/index' | 5 | import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers } from '../../../../shared/extra-utils/index' |
6 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 6 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
7 | import { uploadVideo } from '../../../../shared/utils/videos/videos' | 7 | import { uploadVideo } from '../../../../shared/extra-utils/videos/videos' |
8 | import { getLogs } from '../../../../shared/utils/logs/logs' | 8 | import { getLogs } from '../../../../shared/extra-utils/logs/logs' |
9 | 9 | ||
10 | const expect = chai.expect | 10 | const expect = chai.expect |
11 | 11 | ||
diff --git a/server/tests/api/server/no-client.ts b/server/tests/api/server/no-client.ts index 3b95ce945..88d34063c 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 '../../../../shared/utils' | 7 | } from '../../../../shared/extra-utils' |
8 | import { runServer } from '../../../../shared/utils/server/servers' | 8 | import { runServer } from '../../../../shared/extra-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/server/tests/api/server/reverse-proxy.ts b/server/tests/api/server/reverse-proxy.ts index ee0fffd5a..e7dc16531 100644 --- a/server/tests/api/server/reverse-proxy.ts +++ b/server/tests/api/server/reverse-proxy.ts | |||
@@ -15,7 +15,7 @@ import { | |||
15 | userLogin, | 15 | userLogin, |
16 | viewVideo, | 16 | viewVideo, |
17 | wait | 17 | wait |
18 | } from '../../../../shared/utils' | 18 | } from '../../../../shared/extra-utils' |
19 | const expect = chai.expect | 19 | const expect = chai.expect |
20 | 20 | ||
21 | import { | 21 | import { |
@@ -23,7 +23,7 @@ import { | |||
23 | flushTests, | 23 | flushTests, |
24 | runServer, | 24 | runServer, |
25 | registerUser, getCustomConfig, setAccessTokensToServers, updateCustomConfig | 25 | registerUser, getCustomConfig, setAccessTokensToServers, updateCustomConfig |
26 | } from '../../../../shared/utils/index' | 26 | } from '../../../../shared/extra-utils/index' |
27 | 27 | ||
28 | describe('Test application behind a reverse proxy', function () { | 28 | describe('Test application behind a reverse proxy', function () { |
29 | let server = null | 29 | let server = null |
diff --git a/server/tests/api/server/stats.ts b/server/tests/api/server/stats.ts index eadbcaf83..48addad22 100644 --- a/server/tests/api/server/stats.ts +++ b/server/tests/api/server/stats.ts | |||
@@ -13,11 +13,11 @@ import { | |||
13 | uploadVideo, | 13 | uploadVideo, |
14 | viewVideo, | 14 | viewVideo, |
15 | wait | 15 | wait |
16 | } from '../../../../shared/utils' | 16 | } from '../../../../shared/extra-utils' |
17 | import { flushTests, setAccessTokensToServers } from '../../../../shared/utils/index' | 17 | import { flushTests, setAccessTokensToServers } from '../../../../shared/extra-utils/index' |
18 | import { getStats } from '../../../../shared/utils/server/stats' | 18 | import { getStats } from '../../../../shared/extra-utils/server/stats' |
19 | import { addVideoCommentThread } from '../../../../shared/utils/videos/video-comments' | 19 | import { addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments' |
20 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 20 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
21 | 21 | ||
22 | const expect = chai.expect | 22 | const expect = chai.expect |
23 | 23 | ||
diff --git a/server/tests/api/server/tracker.ts b/server/tests/api/server/tracker.ts index 41803aef1..4f7cc05a7 100644 --- a/server/tests/api/server/tracker.ts +++ b/server/tests/api/server/tracker.ts | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | import * as magnetUtil from 'magnet-uri' | 3 | import * as magnetUtil from 'magnet-uri' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { getVideo, killallServers, reRunServer, runServer, ServerInfo, uploadVideo } from '../../../../shared/utils' | 5 | import { getVideo, killallServers, reRunServer, runServer, ServerInfo, uploadVideo } from '../../../../shared/extra-utils' |
6 | import { flushTests, setAccessTokensToServers } from '../../../../shared/utils/index' | 6 | import { flushTests, setAccessTokensToServers } from '../../../../shared/extra-utils/index' |
7 | import { VideoDetails } from '../../../../shared/models/videos' | 7 | import { VideoDetails } from '../../../../shared/models/videos' |
8 | import * as WebTorrent from 'webtorrent' | 8 | import * as WebTorrent from 'webtorrent' |
9 | 9 | ||
diff --git a/server/tests/api/users/blocklist.ts b/server/tests/api/users/blocklist.ts index 638a443ba..cd96ffe2a 100644 --- a/server/tests/api/users/blocklist.ts +++ b/server/tests/api/users/blocklist.ts | |||
@@ -12,16 +12,16 @@ import { | |||
12 | ServerInfo, | 12 | ServerInfo, |
13 | uploadVideo, | 13 | uploadVideo, |
14 | userLogin | 14 | userLogin |
15 | } from '../../../../shared/utils/index' | 15 | } from '../../../../shared/extra-utils/index' |
16 | import { setAccessTokensToServers } from '../../../../shared/utils/users/login' | 16 | import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' |
17 | import { getVideosListWithToken, getVideosList } from '../../../../shared/utils/videos/videos' | 17 | import { getVideosListWithToken, getVideosList } from '../../../../shared/extra-utils/videos/videos' |
18 | import { | 18 | import { |
19 | addVideoCommentReply, | 19 | addVideoCommentReply, |
20 | addVideoCommentThread, | 20 | addVideoCommentThread, |
21 | getVideoCommentThreads, | 21 | getVideoCommentThreads, |
22 | getVideoThreadComments | 22 | getVideoThreadComments |
23 | } from '../../../../shared/utils/videos/video-comments' | 23 | } from '../../../../shared/extra-utils/videos/video-comments' |
24 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 24 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
25 | import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' | 25 | import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' |
26 | import { | 26 | import { |
27 | addAccountToAccountBlocklist, | 27 | addAccountToAccountBlocklist, |
@@ -36,7 +36,7 @@ import { | |||
36 | removeAccountFromServerBlocklist, | 36 | removeAccountFromServerBlocklist, |
37 | removeServerFromAccountBlocklist, | 37 | removeServerFromAccountBlocklist, |
38 | removeServerFromServerBlocklist | 38 | removeServerFromServerBlocklist |
39 | } from '../../../../shared/utils/users/blocklist' | 39 | } from '../../../../shared/extra-utils/users/blocklist' |
40 | 40 | ||
41 | const expect = chai.expect | 41 | const expect = chai.expect |
42 | 42 | ||
diff --git a/server/tests/api/users/user-subscriptions.ts b/server/tests/api/users/user-subscriptions.ts index 037a79a76..5be185678 100644 --- a/server/tests/api/users/user-subscriptions.ts +++ b/server/tests/api/users/user-subscriptions.ts | |||
@@ -11,18 +11,18 @@ import { | |||
11 | unfollow, | 11 | unfollow, |
12 | updateVideo, | 12 | updateVideo, |
13 | userLogin | 13 | userLogin |
14 | } from '../../../../shared/utils' | 14 | } from '../../../../shared/extra-utils' |
15 | import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/utils/index' | 15 | import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/extra-utils/index' |
16 | import { setAccessTokensToServers } from '../../../../shared/utils/users/login' | 16 | import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' |
17 | import { Video, VideoChannel } from '../../../../shared/models/videos' | 17 | import { Video, VideoChannel } from '../../../../shared/models/videos' |
18 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 18 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
19 | import { | 19 | import { |
20 | addUserSubscription, | 20 | addUserSubscription, |
21 | listUserSubscriptions, | 21 | listUserSubscriptions, |
22 | listUserSubscriptionVideos, | 22 | listUserSubscriptionVideos, |
23 | removeUserSubscription, | 23 | removeUserSubscription, |
24 | getUserSubscription, areSubscriptionsExist | 24 | getUserSubscription, areSubscriptionsExist |
25 | } from '../../../../shared/utils/users/user-subscriptions' | 25 | } from '../../../../shared/extra-utils/users/user-subscriptions' |
26 | 26 | ||
27 | const expect = chai.expect | 27 | const expect = chai.expect |
28 | 28 | ||
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts index 0510b2de9..9b8db0072 100644 --- a/server/tests/api/users/users-multiple-servers.ts +++ b/server/tests/api/users/users-multiple-servers.ts | |||
@@ -14,13 +14,20 @@ import { | |||
14 | removeUser, | 14 | removeUser, |
15 | updateMyUser, | 15 | updateMyUser, |
16 | userLogin | 16 | userLogin |
17 | } from '../../../../shared/utils' | 17 | } from '../../../../shared/extra-utils' |
18 | import { getMyUserInformation, killallServers, ServerInfo, testImage, updateMyAvatar, uploadVideo } from '../../../../shared/utils/index' | 18 | import { |
19 | import { checkActorFilesWereRemoved, getAccount, getAccountsList } from '../../../../shared/utils/users/accounts' | 19 | getMyUserInformation, |
20 | import { setAccessTokensToServers } from '../../../../shared/utils/users/login' | 20 | killallServers, |
21 | ServerInfo, | ||
22 | testImage, | ||
23 | updateMyAvatar, | ||
24 | uploadVideo | ||
25 | } from '../../../../shared/extra-utils/index' | ||
26 | import { checkActorFilesWereRemoved, getAccount, getAccountsList } from '../../../../shared/extra-utils/users/accounts' | ||
27 | import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' | ||
21 | import { User } from '../../../../shared/models/users' | 28 | import { User } from '../../../../shared/models/users' |
22 | import { VideoChannel } from '../../../../shared/models/videos' | 29 | import { VideoChannel } from '../../../../shared/models/videos' |
23 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 30 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
24 | 31 | ||
25 | const expect = chai.expect | 32 | const expect = chai.expect |
26 | 33 | ||
diff --git a/server/tests/api/users/users-verification.ts b/server/tests/api/users/users-verification.ts index babeda2b8..7fcd3e50b 100644 --- a/server/tests/api/users/users-verification.ts +++ b/server/tests/api/users/users-verification.ts | |||
@@ -5,10 +5,10 @@ import 'mocha' | |||
5 | import { | 5 | import { |
6 | registerUser, flushTests, getUserInformation, getMyUserInformation, killallServers, | 6 | registerUser, flushTests, getUserInformation, getMyUserInformation, killallServers, |
7 | userLogin, login, runServer, ServerInfo, verifyEmail, updateCustomSubConfig, wait | 7 | userLogin, login, runServer, ServerInfo, verifyEmail, updateCustomSubConfig, wait |
8 | } from '../../../../shared/utils' | 8 | } from '../../../../shared/extra-utils' |
9 | import { setAccessTokensToServers } from '../../../../shared/utils/users/login' | 9 | import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' |
10 | import { MockSmtpServer } from '../../../../shared/utils/miscs/email' | 10 | import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' |
11 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 11 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
12 | 12 | ||
13 | const expect = chai.expect | 13 | const expect = chai.expect |
14 | 14 | ||
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index 13511e070..472ff511c 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts | |||
@@ -33,10 +33,10 @@ import { | |||
33 | updateUser, | 33 | updateUser, |
34 | uploadVideo, | 34 | uploadVideo, |
35 | userLogin | 35 | userLogin |
36 | } from '../../../../shared/utils' | 36 | } from '../../../../shared/extra-utils' |
37 | import { follow } from '../../../../shared/utils/server/follows' | 37 | import { follow } from '../../../../shared/extra-utils/server/follows' |
38 | import { setAccessTokensToServers } from '../../../../shared/utils/users/login' | 38 | import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' |
39 | import { getMyVideos } from '../../../../shared/utils/videos/videos' | 39 | import { getMyVideos } from '../../../../shared/extra-utils/videos/videos' |
40 | import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' | 40 | import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' |
41 | 41 | ||
42 | const expect = chai.expect | 42 | const expect = chai.expect |
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index 46486b777..dd50f905d 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -32,15 +32,15 @@ import { | |||
32 | viewVideo, | 32 | viewVideo, |
33 | wait, | 33 | wait, |
34 | webtorrentAdd | 34 | webtorrentAdd |
35 | } from '../../../../shared/utils' | 35 | } from '../../../../shared/extra-utils' |
36 | import { | 36 | import { |
37 | addVideoCommentReply, | 37 | addVideoCommentReply, |
38 | addVideoCommentThread, | 38 | addVideoCommentThread, |
39 | deleteVideoComment, | 39 | deleteVideoComment, |
40 | getVideoCommentThreads, | 40 | getVideoCommentThreads, |
41 | getVideoThreadComments | 41 | getVideoThreadComments |
42 | } from '../../../../shared/utils/videos/video-comments' | 42 | } from '../../../../shared/extra-utils/videos/video-comments' |
43 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 43 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
44 | 44 | ||
45 | const expect = chai.expect | 45 | const expect = chai.expect |
46 | 46 | ||
diff --git a/server/tests/api/videos/services.ts b/server/tests/api/videos/services.ts index 2da86964f..e79ce59a6 100644 --- a/server/tests/api/videos/services.ts +++ b/server/tests/api/videos/services.ts | |||
@@ -10,8 +10,8 @@ import { | |||
10 | ServerInfo, | 10 | ServerInfo, |
11 | setAccessTokensToServers, | 11 | setAccessTokensToServers, |
12 | uploadVideo | 12 | uploadVideo |
13 | } from '../../../../shared/utils/index' | 13 | } from '../../../../shared/extra-utils/index' |
14 | import { runServer } from '../../../../shared/utils/server/servers' | 14 | import { runServer } from '../../../../shared/extra-utils/server/servers' |
15 | 15 | ||
16 | const expect = chai.expect | 16 | const expect = chai.expect |
17 | 17 | ||
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index cfdcbaf3f..ea3e7c421 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts | |||
@@ -28,7 +28,7 @@ import { | |||
28 | uploadVideo, | 28 | uploadVideo, |
29 | viewVideo, | 29 | viewVideo, |
30 | wait | 30 | wait |
31 | } from '../../../../shared/utils' | 31 | } from '../../../../shared/extra-utils' |
32 | 32 | ||
33 | const expect = chai.expect | 33 | const expect = chai.expect |
34 | 34 | ||
diff --git a/server/tests/api/videos/video-abuse.ts b/server/tests/api/videos/video-abuse.ts index 3a7b623da..2ae1bf34d 100644 --- a/server/tests/api/videos/video-abuse.ts +++ b/server/tests/api/videos/video-abuse.ts | |||
@@ -14,9 +14,9 @@ import { | |||
14 | setAccessTokensToServers, | 14 | setAccessTokensToServers, |
15 | updateVideoAbuse, | 15 | updateVideoAbuse, |
16 | uploadVideo | 16 | uploadVideo |
17 | } from '../../../../shared/utils/index' | 17 | } from '../../../../shared/extra-utils/index' |
18 | import { doubleFollow } from '../../../../shared/utils/server/follows' | 18 | import { doubleFollow } from '../../../../shared/extra-utils/server/follows' |
19 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 19 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
20 | 20 | ||
21 | const expect = chai.expect | 21 | const expect = chai.expect |
22 | 22 | ||
diff --git a/server/tests/api/videos/video-blacklist.ts b/server/tests/api/videos/video-blacklist.ts index 1feae19e9..582c82e05 100644 --- a/server/tests/api/videos/video-blacklist.ts +++ b/server/tests/api/videos/video-blacklist.ts | |||
@@ -20,9 +20,9 @@ import { | |||
20 | updateVideoBlacklist, | 20 | updateVideoBlacklist, |
21 | uploadVideo, | 21 | uploadVideo, |
22 | userLogin | 22 | userLogin |
23 | } from '../../../../shared/utils/index' | 23 | } from '../../../../shared/extra-utils/index' |
24 | import { doubleFollow } from '../../../../shared/utils/server/follows' | 24 | import { doubleFollow } from '../../../../shared/extra-utils/server/follows' |
25 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 25 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
26 | import { VideoBlacklist, VideoBlacklistType } from '../../../../shared/models/videos' | 26 | import { VideoBlacklist, VideoBlacklistType } from '../../../../shared/models/videos' |
27 | import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' | 27 | import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' |
28 | import { UserRole } from '../../../../shared/models/users' | 28 | import { UserRole } from '../../../../shared/models/users' |
diff --git a/server/tests/api/videos/video-captions.ts b/server/tests/api/videos/video-captions.ts index 57bee713f..da920e00c 100644 --- a/server/tests/api/videos/video-captions.ts +++ b/server/tests/api/videos/video-captions.ts | |||
@@ -9,10 +9,15 @@ import { | |||
9 | removeVideo, | 9 | removeVideo, |
10 | uploadVideo, | 10 | uploadVideo, |
11 | wait | 11 | wait |
12 | } from '../../../../shared/utils' | 12 | } from '../../../../shared/extra-utils' |
13 | import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/utils/index' | 13 | import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/extra-utils/index' |
14 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 14 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
15 | import { createVideoCaption, deleteVideoCaption, listVideoCaptions, testCaptionFile } from '../../../../shared/utils/videos/video-captions' | 15 | import { |
16 | createVideoCaption, | ||
17 | deleteVideoCaption, | ||
18 | listVideoCaptions, | ||
19 | testCaptionFile | ||
20 | } from '../../../../shared/extra-utils/videos/video-captions' | ||
16 | import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model' | 21 | import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model' |
17 | 22 | ||
18 | const expect = chai.expect | 23 | const expect = chai.expect |
diff --git a/server/tests/api/videos/video-change-ownership.ts b/server/tests/api/videos/video-change-ownership.ts index a23e30dc0..9040ac308 100644 --- a/server/tests/api/videos/video-change-ownership.ts +++ b/server/tests/api/videos/video-change-ownership.ts | |||
@@ -18,8 +18,8 @@ import { | |||
18 | uploadVideo, | 18 | uploadVideo, |
19 | userLogin, | 19 | userLogin, |
20 | getVideo | 20 | getVideo |
21 | } from '../../../../shared/utils' | 21 | } from '../../../../shared/extra-utils' |
22 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 22 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
23 | import { User } from '../../../../shared/models/users' | 23 | import { User } from '../../../../shared/models/users' |
24 | import { VideoDetails } from '../../../../shared/models/videos' | 24 | import { VideoDetails } from '../../../../shared/models/videos' |
25 | 25 | ||
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts index bd672cf41..e30e6bb4f 100644 --- a/server/tests/api/videos/video-channels.ts +++ b/server/tests/api/videos/video-channels.ts | |||
@@ -13,7 +13,7 @@ import { | |||
13 | updateVideoChannelAvatar, | 13 | updateVideoChannelAvatar, |
14 | uploadVideo, | 14 | uploadVideo, |
15 | userLogin | 15 | userLogin |
16 | } from '../../../../shared/utils' | 16 | } from '../../../../shared/extra-utils' |
17 | import { | 17 | import { |
18 | addVideoChannel, | 18 | addVideoChannel, |
19 | deleteVideoChannel, | 19 | deleteVideoChannel, |
@@ -26,8 +26,8 @@ import { | |||
26 | ServerInfo, | 26 | ServerInfo, |
27 | setAccessTokensToServers, | 27 | setAccessTokensToServers, |
28 | updateVideoChannel | 28 | updateVideoChannel |
29 | } from '../../../../shared/utils/index' | 29 | } from '../../../../shared/extra-utils/index' |
30 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 30 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
31 | 31 | ||
32 | const expect = chai.expect | 32 | const expect = chai.expect |
33 | 33 | ||
diff --git a/server/tests/api/videos/video-comments.ts b/server/tests/api/videos/video-comments.ts index ce1b17e35..abf4d0c44 100644 --- a/server/tests/api/videos/video-comments.ts +++ b/server/tests/api/videos/video-comments.ts | |||
@@ -3,7 +3,7 @@ | |||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' | 5 | import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' |
6 | import { testImage } from '../../../../shared/utils' | 6 | import { testImage } from '../../../../shared/extra-utils' |
7 | import { | 7 | import { |
8 | dateIsValid, | 8 | dateIsValid, |
9 | flushTests, | 9 | flushTests, |
@@ -13,14 +13,14 @@ import { | |||
13 | setAccessTokensToServers, | 13 | setAccessTokensToServers, |
14 | updateMyAvatar, | 14 | updateMyAvatar, |
15 | uploadVideo | 15 | uploadVideo |
16 | } from '../../../../shared/utils/index' | 16 | } from '../../../../shared/extra-utils/index' |
17 | import { | 17 | import { |
18 | addVideoCommentReply, | 18 | addVideoCommentReply, |
19 | addVideoCommentThread, | 19 | addVideoCommentThread, |
20 | deleteVideoComment, | 20 | deleteVideoComment, |
21 | getVideoCommentThreads, | 21 | getVideoCommentThreads, |
22 | getVideoThreadComments | 22 | getVideoThreadComments |
23 | } from '../../../../shared/utils/videos/video-comments' | 23 | } from '../../../../shared/extra-utils/videos/video-comments' |
24 | 24 | ||
25 | const expect = chai.expect | 25 | const expect = chai.expect |
26 | 26 | ||
diff --git a/server/tests/api/videos/video-description.ts b/server/tests/api/videos/video-description.ts index cbda0b9a6..0c03d17d8 100644 --- a/server/tests/api/videos/video-description.ts +++ b/server/tests/api/videos/video-description.ts | |||
@@ -12,9 +12,9 @@ import { | |||
12 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
13 | updateVideo, | 13 | updateVideo, |
14 | uploadVideo | 14 | uploadVideo |
15 | } from '../../../../shared/utils/index' | 15 | } from '../../../../shared/extra-utils/index' |
16 | import { doubleFollow } from '../../../../shared/utils/server/follows' | 16 | import { doubleFollow } from '../../../../shared/extra-utils/server/follows' |
17 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 17 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
18 | 18 | ||
19 | const expect = chai.expect | 19 | const expect = chai.expect |
20 | 20 | ||
diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts index 3d04758b1..a9251406a 100644 --- a/server/tests/api/videos/video-hls.ts +++ b/server/tests/api/videos/video-hls.ts | |||
@@ -18,7 +18,7 @@ import { | |||
18 | updateVideo, | 18 | updateVideo, |
19 | uploadVideo, | 19 | uploadVideo, |
20 | waitJobs | 20 | waitJobs |
21 | } from '../../../../shared/utils' | 21 | } from '../../../../shared/extra-utils' |
22 | import { VideoDetails } from '../../../../shared/models/videos' | 22 | import { VideoDetails } from '../../../../shared/models/videos' |
23 | import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type' | 23 | import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type' |
24 | import { join } from 'path' | 24 | import { join } from 'path' |
diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts index c5ffb793b..f8b2c0407 100644 --- a/server/tests/api/videos/video-imports.ts +++ b/server/tests/api/videos/video-imports.ts | |||
@@ -14,9 +14,9 @@ import { | |||
14 | killallServers, | 14 | killallServers, |
15 | ServerInfo, | 15 | ServerInfo, |
16 | setAccessTokensToServers | 16 | setAccessTokensToServers |
17 | } from '../../../../shared/utils' | 17 | } from '../../../../shared/extra-utils' |
18 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 18 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
19 | import { getMagnetURI, getYoutubeVideoUrl, importVideo, getMyVideoImports } from '../../../../shared/utils/videos/video-imports' | 19 | import { getMagnetURI, getYoutubeVideoUrl, importVideo, getMyVideoImports } from '../../../../shared/extra-utils/videos/video-imports' |
20 | 20 | ||
21 | const expect = chai.expect | 21 | const expect = chai.expect |
22 | 22 | ||
diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts index cb972d921..9f2d99ffe 100644 --- a/server/tests/api/videos/video-nsfw.ts +++ b/server/tests/api/videos/video-nsfw.ts | |||
@@ -9,10 +9,10 @@ import { | |||
9 | ServerInfo, | 9 | ServerInfo, |
10 | setAccessTokensToServers, | 10 | setAccessTokensToServers, |
11 | uploadVideo | 11 | uploadVideo |
12 | } from '../../../../shared/utils/index' | 12 | } from '../../../../shared/extra-utils/index' |
13 | import { userLogin } from '../../../../shared/utils/users/login' | 13 | import { userLogin } from '../../../../shared/extra-utils/users/login' |
14 | import { createUser } from '../../../../shared/utils/users/users' | 14 | import { createUser } from '../../../../shared/extra-utils/users/users' |
15 | import { getMyVideos } from '../../../../shared/utils/videos/videos' | 15 | import { getMyVideos } from '../../../../shared/extra-utils/videos/videos' |
16 | import { | 16 | import { |
17 | getAccountVideos, | 17 | getAccountVideos, |
18 | getConfig, | 18 | getConfig, |
@@ -25,7 +25,7 @@ import { | |||
25 | searchVideoWithToken, | 25 | searchVideoWithToken, |
26 | updateCustomConfig, | 26 | updateCustomConfig, |
27 | updateMyUser | 27 | updateMyUser |
28 | } from '../../../../shared/utils' | 28 | } from '../../../../shared/extra-utils' |
29 | import { ServerConfig } from '../../../../shared/models' | 29 | import { ServerConfig } from '../../../../shared/models' |
30 | import { CustomConfig } from '../../../../shared/models/server/custom-config.model' | 30 | import { CustomConfig } from '../../../../shared/models/server/custom-config.model' |
31 | import { User } from '../../../../shared/models/users' | 31 | import { User } from '../../../../shared/models/users' |
diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts index d9cb71992..8c3542906 100644 --- a/server/tests/api/videos/video-playlists.ts +++ b/server/tests/api/videos/video-playlists.ts | |||
@@ -36,7 +36,7 @@ import { | |||
36 | uploadVideoAndGetId, | 36 | uploadVideoAndGetId, |
37 | userLogin, | 37 | userLogin, |
38 | waitJobs | 38 | waitJobs |
39 | } from '../../../../shared/utils' | 39 | } from '../../../../shared/extra-utils' |
40 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' | 40 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' |
41 | import { VideoPlaylist } from '../../../../shared/models/videos/playlist/video-playlist.model' | 41 | import { VideoPlaylist } from '../../../../shared/models/videos/playlist/video-playlist.model' |
42 | import { Video } from '../../../../shared/models/videos' | 42 | import { Video } from '../../../../shared/models/videos' |
diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts index e1b5fb193..ba5e0f044 100644 --- a/server/tests/api/videos/video-privacy.ts +++ b/server/tests/api/videos/video-privacy.ts | |||
@@ -10,12 +10,12 @@ import { | |||
10 | ServerInfo, | 10 | ServerInfo, |
11 | setAccessTokensToServers, | 11 | setAccessTokensToServers, |
12 | uploadVideo | 12 | uploadVideo |
13 | } from '../../../../shared/utils/index' | 13 | } from '../../../../shared/extra-utils/index' |
14 | import { doubleFollow } from '../../../../shared/utils/server/follows' | 14 | import { doubleFollow } from '../../../../shared/extra-utils/server/follows' |
15 | import { userLogin } from '../../../../shared/utils/users/login' | 15 | import { userLogin } from '../../../../shared/extra-utils/users/login' |
16 | import { createUser } from '../../../../shared/utils/users/users' | 16 | import { createUser } from '../../../../shared/extra-utils/users/users' |
17 | import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../../../shared/utils/videos/videos' | 17 | import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../../../shared/extra-utils/videos/videos' |
18 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 18 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
19 | 19 | ||
20 | const expect = chai.expect | 20 | const expect = chai.expect |
21 | 21 | ||
diff --git a/server/tests/api/videos/video-schedule-update.ts b/server/tests/api/videos/video-schedule-update.ts index 632c4244c..b19a9116a 100644 --- a/server/tests/api/videos/video-schedule-update.ts +++ b/server/tests/api/videos/video-schedule-update.ts | |||
@@ -15,8 +15,8 @@ import { | |||
15 | updateVideo, | 15 | updateVideo, |
16 | uploadVideo, | 16 | uploadVideo, |
17 | wait | 17 | wait |
18 | } from '../../../../shared/utils' | 18 | } from '../../../../shared/extra-utils' |
19 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 19 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
20 | 20 | ||
21 | const expect = chai.expect | 21 | const expect = chai.expect |
22 | 22 | ||
diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts index eefd32ef8..3d4739ca9 100644 --- a/server/tests/api/videos/video-transcoder.ts +++ b/server/tests/api/videos/video-transcoder.ts | |||
@@ -19,9 +19,9 @@ import { | |||
19 | setAccessTokensToServers, | 19 | setAccessTokensToServers, |
20 | uploadVideo, | 20 | uploadVideo, |
21 | webtorrentAdd | 21 | webtorrentAdd |
22 | } from '../../../../shared/utils' | 22 | } from '../../../../shared/extra-utils' |
23 | import { extname, join } from 'path' | 23 | import { extname, join } from 'path' |
24 | import { waitJobs } from '../../../../shared/utils/server/jobs' | 24 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
25 | import { VIDEO_TRANSCODING_FPS } from '../../../../server/initializers/constants' | 25 | import { VIDEO_TRANSCODING_FPS } from '../../../../server/initializers/constants' |
26 | 26 | ||
27 | const expect = chai.expect | 27 | const expect = chai.expect |
diff --git a/server/tests/api/videos/videos-filter.ts b/server/tests/api/videos/videos-filter.ts index 920ca0023..36664b17f 100644 --- a/server/tests/api/videos/videos-filter.ts +++ b/server/tests/api/videos/videos-filter.ts | |||
@@ -13,7 +13,7 @@ import { | |||
13 | setAccessTokensToServers, | 13 | setAccessTokensToServers, |
14 | uploadVideo, | 14 | uploadVideo, |
15 | userLogin | 15 | userLogin |
16 | } from '../../../../shared/utils' | 16 | } from '../../../../shared/extra-utils' |
17 | import { Video, VideoPrivacy } from '../../../../shared/models/videos' | 17 | import { Video, VideoPrivacy } from '../../../../shared/models/videos' |
18 | import { UserRole } from '../../../../shared/models/users' | 18 | import { UserRole } from '../../../../shared/models/users' |
19 | 19 | ||
diff --git a/server/tests/api/videos/videos-history.ts b/server/tests/api/videos/videos-history.ts index ab40bb64c..6f75ce42c 100644 --- a/server/tests/api/videos/videos-history.ts +++ b/server/tests/api/videos/videos-history.ts | |||
@@ -16,9 +16,9 @@ import { | |||
16 | uploadVideo, | 16 | uploadVideo, |
17 | userLogin, | 17 | userLogin, |
18 | wait | 18 | wait |
19 | } from '../../../../shared/utils' | 19 | } from '../../../../shared/extra-utils' |
20 | import { Video, VideoDetails } from '../../../../shared/models/videos' | 20 | import { Video, VideoDetails } from '../../../../shared/models/videos' |
21 | import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '../../../../shared/utils/videos/video-history' | 21 | import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '../../../../shared/extra-utils/videos/video-history' |
22 | 22 | ||
23 | const expect = chai.expect | 23 | const expect = chai.expect |
24 | 24 | ||
diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts index 7221bcae6..233ca8a5d 100644 --- a/server/tests/api/videos/videos-overview.ts +++ b/server/tests/api/videos/videos-overview.ts | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/utils' | 5 | import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/extra-utils' |
6 | import { getVideosOverview } from '../../../../shared/utils/overviews/overviews' | 6 | import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews' |
7 | import { VideosOverview } from '../../../../shared/models/overviews' | 7 | import { VideosOverview } from '../../../../shared/models/overviews' |
8 | 8 | ||
9 | const expect = chai.expect | 9 | const expect = chai.expect |
diff --git a/server/tests/api/videos/videos-views-cleaner.ts b/server/tests/api/videos/videos-views-cleaner.ts index 9f268c8e6..4001969c3 100644 --- a/server/tests/api/videos/videos-views-cleaner.ts +++ b/server/tests/api/videos/videos-views-cleaner.ts | |||
@@ -11,10 +11,10 @@ import { | |||
11 | ServerInfo, | 11 | ServerInfo, |
12 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
13 | uploadVideo, uploadVideoAndGetId, viewVideo, wait, countVideoViewsOf, doubleFollow, waitJobs | 13 | uploadVideo, uploadVideoAndGetId, viewVideo, wait, countVideoViewsOf, doubleFollow, waitJobs |
14 | } from '../../../../shared/utils' | 14 | } from '../../../../shared/extra-utils' |
15 | import { getVideosOverview } from '../../../../shared/utils/overviews/overviews' | 15 | import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews' |
16 | import { VideosOverview } from '../../../../shared/models/overviews' | 16 | import { VideosOverview } from '../../../../shared/models/overviews' |
17 | import { listMyVideosHistory } from '../../../../shared/utils/videos/video-history' | 17 | import { listMyVideosHistory } from '../../../../shared/extra-utils/videos/video-history' |
18 | 18 | ||
19 | const expect = chai.expect | 19 | const expect = chai.expect |
20 | 20 | ||
diff --git a/server/tests/cli/create-import-video-file-job.ts b/server/tests/cli/create-import-video-file-job.ts index 4acda47b1..4dc12a1c6 100644 --- a/server/tests/cli/create-import-video-file-job.ts +++ b/server/tests/cli/create-import-video-file-job.ts | |||
@@ -15,8 +15,8 @@ import { | |||
15 | ServerInfo, | 15 | ServerInfo, |
16 | setAccessTokensToServers, | 16 | setAccessTokensToServers, |
17 | uploadVideo | 17 | uploadVideo |
18 | } from '../../../shared/utils' | 18 | } from '../../../shared/extra-utils' |
19 | import { waitJobs } from '../../../shared/utils/server/jobs' | 19 | import { waitJobs } from '../../../shared/extra-utils/server/jobs' |
20 | 20 | ||
21 | const expect = chai.expect | 21 | const expect = chai.expect |
22 | 22 | ||
diff --git a/server/tests/cli/create-transcoding-job.ts b/server/tests/cli/create-transcoding-job.ts index 50be5fa19..bd1de2079 100644 --- a/server/tests/cli/create-transcoding-job.ts +++ b/server/tests/cli/create-transcoding-job.ts | |||
@@ -15,8 +15,8 @@ import { | |||
15 | ServerInfo, | 15 | ServerInfo, |
16 | setAccessTokensToServers, | 16 | setAccessTokensToServers, |
17 | uploadVideo, wait | 17 | uploadVideo, wait |
18 | } from '../../../shared/utils' | 18 | } from '../../../shared/extra-utils' |
19 | import { waitJobs } from '../../../shared/utils/server/jobs' | 19 | import { waitJobs } from '../../../shared/extra-utils/server/jobs' |
20 | 20 | ||
21 | const expect = chai.expect | 21 | const expect = chai.expect |
22 | 22 | ||
diff --git a/server/tests/cli/optimize-old-videos.ts b/server/tests/cli/optimize-old-videos.ts index f84ba1ece..b3724476b 100644 --- a/server/tests/cli/optimize-old-videos.ts +++ b/server/tests/cli/optimize-old-videos.ts | |||
@@ -15,8 +15,8 @@ import { | |||
15 | ServerInfo, | 15 | ServerInfo, |
16 | setAccessTokensToServers, | 16 | setAccessTokensToServers, |
17 | uploadVideo, viewVideo, wait | 17 | uploadVideo, viewVideo, wait |
18 | } from '../../../shared/utils' | 18 | } from '../../../shared/extra-utils' |
19 | import { waitJobs } from '../../../shared/utils/server/jobs' | 19 | import { waitJobs } from '../../../shared/extra-utils/server/jobs' |
20 | import { getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '../../helpers/ffmpeg-utils' | 20 | import { getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '../../helpers/ffmpeg-utils' |
21 | import { VIDEO_TRANSCODING_FPS } from '../../initializers/constants' | 21 | import { VIDEO_TRANSCODING_FPS } from '../../initializers/constants' |
22 | import { join } from 'path' | 22 | import { join } from 'path' |
diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts index b0ae876d3..45411bdbc 100644 --- a/server/tests/cli/peertube.ts +++ b/server/tests/cli/peertube.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | runServer, | 11 | runServer, |
12 | ServerInfo, | 12 | ServerInfo, |
13 | setAccessTokensToServers | 13 | setAccessTokensToServers |
14 | } from '../../../shared/utils' | 14 | } from '../../../shared/extra-utils' |
15 | 15 | ||
16 | describe('Test CLI wrapper', function () { | 16 | describe('Test CLI wrapper', function () { |
17 | let server: ServerInfo | 17 | let server: ServerInfo |
diff --git a/server/tests/cli/reset-password.ts b/server/tests/cli/reset-password.ts index 4c9f0c5f8..3c56bf45b 100644 --- a/server/tests/cli/reset-password.ts +++ b/server/tests/cli/reset-password.ts | |||
@@ -10,7 +10,7 @@ import { | |||
10 | runServer, | 10 | runServer, |
11 | ServerInfo, | 11 | ServerInfo, |
12 | setAccessTokensToServers | 12 | setAccessTokensToServers |
13 | } from '../../../shared/utils' | 13 | } from '../../../shared/extra-utils' |
14 | 14 | ||
15 | describe('Test reset password scripts', function () { | 15 | describe('Test reset password scripts', function () { |
16 | let server: ServerInfo | 16 | let server: ServerInfo |
diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts index 39533edea..2270ff494 100644 --- a/server/tests/cli/update-host.ts +++ b/server/tests/cli/update-host.ts | |||
@@ -3,8 +3,8 @@ | |||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { VideoDetails } from '../../../shared/models/videos' | 5 | import { VideoDetails } from '../../../shared/models/videos' |
6 | import { waitJobs } from '../../../shared/utils/server/jobs' | 6 | import { waitJobs } from '../../../shared/extra-utils/server/jobs' |
7 | import { addVideoCommentThread } from '../../../shared/utils/videos/video-comments' | 7 | import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments' |
8 | import { | 8 | import { |
9 | addVideoChannel, | 9 | addVideoChannel, |
10 | createUser, | 10 | createUser, |
@@ -21,8 +21,8 @@ import { | |||
21 | ServerInfo, | 21 | ServerInfo, |
22 | setAccessTokensToServers, | 22 | setAccessTokensToServers, |
23 | uploadVideo | 23 | uploadVideo |
24 | } from '../../../shared/utils' | 24 | } from '../../../shared/extra-utils' |
25 | import { getAccountsList } from '../../../shared/utils/users/accounts' | 25 | import { getAccountsList } from '../../../shared/extra-utils/users/accounts' |
26 | 26 | ||
27 | const expect = chai.expect | 27 | const expect = chai.expect |
28 | 28 | ||
diff --git a/server/tests/client.ts b/server/tests/client.ts index 06b4a9c5a..116189510 100644 --- a/server/tests/client.ts +++ b/server/tests/client.ts | |||
@@ -15,7 +15,7 @@ import { | |||
15 | updateCustomConfig, | 15 | updateCustomConfig, |
16 | updateCustomSubConfig, | 16 | updateCustomSubConfig, |
17 | uploadVideo | 17 | uploadVideo |
18 | } from '../../shared/utils' | 18 | } from '../../shared/extra-utils' |
19 | 19 | ||
20 | const expect = chai.expect | 20 | const expect = chai.expect |
21 | 21 | ||
diff --git a/server/tests/feeds/feeds.ts b/server/tests/feeds/feeds.ts index d632be427..0e9ea1a18 100644 --- a/server/tests/feeds/feeds.ts +++ b/server/tests/feeds/feeds.ts | |||
@@ -13,10 +13,10 @@ import { | |||
13 | ServerInfo, | 13 | ServerInfo, |
14 | setAccessTokensToServers, | 14 | setAccessTokensToServers, |
15 | uploadVideo, userLogin | 15 | uploadVideo, userLogin |
16 | } from '../../../shared/utils' | 16 | } from '../../../shared/extra-utils' |
17 | import * as libxmljs from 'libxmljs' | 17 | import * as libxmljs from 'libxmljs' |
18 | import { addVideoCommentThread } from '../../../shared/utils/videos/video-comments' | 18 | import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments' |
19 | import { waitJobs } from '../../../shared/utils/server/jobs' | 19 | import { waitJobs } from '../../../shared/extra-utils/server/jobs' |
20 | import { User } from '../../../shared/models/users' | 20 | import { User } from '../../../shared/models/users' |
21 | 21 | ||
22 | chai.use(require('chai-xml')) | 22 | chai.use(require('chai-xml')) |
diff --git a/server/tests/helpers/request.ts b/server/tests/helpers/request.ts index 95a74fdfa..a754bc6e2 100644 --- a/server/tests/helpers/request.ts +++ b/server/tests/helpers/request.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { doRequest, doRequestAndSaveToFile } from '../../helpers/requests' | 4 | import { doRequest, doRequestAndSaveToFile } from '../../helpers/requests' |
5 | import { get4KFileUrl, root, wait } from '../../../shared/utils' | 5 | import { get4KFileUrl, root, wait } from '../../../shared/extra-utils' |
6 | import { join } from 'path' | 6 | import { join } from 'path' |
7 | import { pathExists, remove } from 'fs-extra' | 7 | import { pathExists, remove } from 'fs-extra' |
8 | import { expect } from 'chai' | 8 | import { expect } from 'chai' |
diff --git a/server/tests/misc-endpoints.ts b/server/tests/misc-endpoints.ts index 104876f2f..d78b62d60 100644 --- a/server/tests/misc-endpoints.ts +++ b/server/tests/misc-endpoints.ts | |||
@@ -12,7 +12,7 @@ import { | |||
12 | ServerInfo, | 12 | ServerInfo, |
13 | setAccessTokensToServers, | 13 | setAccessTokensToServers, |
14 | uploadVideo | 14 | uploadVideo |
15 | } from '../../shared/utils' | 15 | } from '../../shared/extra-utils' |
16 | import { VideoPrivacy } from '../../shared/models/videos' | 16 | import { VideoPrivacy } from '../../shared/models/videos' |
17 | 17 | ||
18 | const expect = chai.expect | 18 | const expect = chai.expect |
diff --git a/server/tests/real-world/populate-database.ts b/server/tests/real-world/populate-database.ts index 3616127ad..459c9cbd8 100644 --- a/server/tests/real-world/populate-database.ts +++ b/server/tests/real-world/populate-database.ts | |||
@@ -10,7 +10,7 @@ import { | |||
10 | ServerInfo, | 10 | ServerInfo, |
11 | setAccessTokensToServers, | 11 | setAccessTokensToServers, |
12 | uploadVideo | 12 | uploadVideo |
13 | } from '../../../shared/utils' | 13 | } from '../../../shared/extra-utils' |
14 | import * as Bluebird from 'bluebird' | 14 | import * as Bluebird from 'bluebird' |
15 | 15 | ||
16 | start() | 16 | start() |
diff --git a/server/tests/real-world/real-world.ts b/server/tests/real-world/real-world.ts index ac3baaf9a..8b070004d 100644 --- a/server/tests/real-world/real-world.ts +++ b/server/tests/real-world/real-world.ts | |||
@@ -16,8 +16,8 @@ import { | |||
16 | updateVideo, | 16 | updateVideo, |
17 | uploadVideo, viewVideo, | 17 | uploadVideo, viewVideo, |
18 | wait | 18 | wait |
19 | } from '../../../shared/utils' | 19 | } from '../../../shared/extra-utils' |
20 | import { getJobsListPaginationAndSort } from '../../../shared/utils/server/jobs' | 20 | import { getJobsListPaginationAndSort } from '../../../shared/extra-utils/server/jobs' |
21 | 21 | ||
22 | interface ServerInfo extends DefaultServerInfo { | 22 | interface ServerInfo extends DefaultServerInfo { |
23 | requestsNumber: number | 23 | requestsNumber: number |