diff options
author | buoyantair <buoyantair@gmail.com> | 2018-10-29 22:18:31 +0530 |
---|---|---|
committer | buoyantair <buoyantair@gmail.com> | 2018-10-29 22:18:31 +0530 |
commit | 9639bd175726b73f8fe664b5ced12a72407b1f0b (patch) | |
tree | 689d4c9e0a1f8dcc55e0ba4e694af3b09bff2cad /server/tests/api | |
parent | 71607e4a65d3a8904bcd418ab7acbc2f34f725ff (diff) | |
download | PeerTube-9639bd175726b73f8fe664b5ced12a72407b1f0b.tar.gz PeerTube-9639bd175726b73f8fe664b5ced12a72407b1f0b.tar.zst PeerTube-9639bd175726b73f8fe664b5ced12a72407b1f0b.zip |
Move utils to /shared
Move utils used by /server/tools/* & /server/tests/**/* into
/shared folder.
Issue: #1336
Diffstat (limited to 'server/tests/api')
56 files changed, 284 insertions, 169 deletions
diff --git a/server/tests/api/check-params/accounts.ts b/server/tests/api/check-params/accounts.ts index 9e0b1e35c..567fd072c 100644 --- a/server/tests/api/check-params/accounts.ts +++ b/server/tests/api/check-params/accounts.ts | |||
@@ -2,9 +2,13 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | 4 | ||
5 | import { flushTests, killallServers, runServer, ServerInfo } from '../../utils' | 5 | import { flushTests, killallServers, runServer, ServerInfo } from '../../../../shared/utils' |
6 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' | 6 | import { |
7 | import { getAccount } from '../../utils/users/accounts' | 7 | checkBadCountPagination, |
8 | checkBadSortPagination, | ||
9 | checkBadStartPagination | ||
10 | } from '../../../../shared/utils/requests/check-api-params' | ||
11 | import { getAccount } from '../../../../shared/utils/users/accounts' | ||
8 | 12 | ||
9 | describe('Test users API validators', function () { | 13 | describe('Test users API validators', function () { |
10 | 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 c745ac975..c20453c16 100644 --- a/server/tests/api/check-params/blocklist.ts +++ b/server/tests/api/check-params/blocklist.ts | |||
@@ -13,8 +13,12 @@ import { | |||
13 | makePostBodyRequest, | 13 | makePostBodyRequest, |
14 | ServerInfo, | 14 | ServerInfo, |
15 | setAccessTokensToServers, userLogin | 15 | setAccessTokensToServers, userLogin |
16 | } from '../../utils' | 16 | } from '../../../../shared/utils' |
17 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' | 17 | import { |
18 | checkBadCountPagination, | ||
19 | checkBadSortPagination, | ||
20 | checkBadStartPagination | ||
21 | } from '../../../../shared/utils/requests/check-api-params' | ||
18 | 22 | ||
19 | describe('Test blocklist API validators', function () { | 23 | describe('Test blocklist API validators', function () { |
20 | 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 d807f910b..ffae380c1 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 '../../utils' | 10 | } from '../../../../shared/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/follows.ts b/server/tests/api/check-params/follows.ts index cdc95c81a..2ad1575a3 100644 --- a/server/tests/api/check-params/follows.ts +++ b/server/tests/api/check-params/follows.ts | |||
@@ -5,8 +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 '../../utils' | 8 | } from '../../../../shared/utils' |
9 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' | 9 | import { |
10 | checkBadCountPagination, | ||
11 | checkBadSortPagination, | ||
12 | checkBadStartPagination | ||
13 | } from '../../../../shared/utils/requests/check-api-params' | ||
10 | 14 | ||
11 | describe('Test server follows API validators', function () { | 15 | describe('Test server follows API validators', function () { |
12 | 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 ce3ac8809..89760ff98 100644 --- a/server/tests/api/check-params/jobs.ts +++ b/server/tests/api/check-params/jobs.ts | |||
@@ -2,9 +2,21 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | 4 | ||
5 | import { createUser, flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, userLogin } from '../../utils' | 5 | import { |
6 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' | 6 | createUser, |
7 | import { makeGetRequest } from '../../utils/requests/requests' | 7 | flushTests, |
8 | killallServers, | ||
9 | runServer, | ||
10 | ServerInfo, | ||
11 | setAccessTokensToServers, | ||
12 | userLogin | ||
13 | } from '../../../../shared/utils' | ||
14 | import { | ||
15 | checkBadCountPagination, | ||
16 | checkBadSortPagination, | ||
17 | checkBadStartPagination | ||
18 | } from '../../../../shared/utils/requests/check-api-params' | ||
19 | import { makeGetRequest } from '../../../../shared/utils/requests/requests' | ||
8 | 20 | ||
9 | describe('Test jobs API validators', function () { | 21 | describe('Test jobs API validators', function () { |
10 | const path = '/api/v1/jobs/failed' | 22 | const path = '/api/v1/jobs/failed' |
diff --git a/server/tests/api/check-params/redundancy.ts b/server/tests/api/check-params/redundancy.ts index aa588e3dd..ff4726ceb 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 '../../utils' | 15 | } from '../../../../shared/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 eabf602ac..aa81965f3 100644 --- a/server/tests/api/check-params/search.ts +++ b/server/tests/api/check-params/search.ts | |||
@@ -2,8 +2,12 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | 4 | ||
5 | import { flushTests, immutableAssign, killallServers, makeGetRequest, runServer, ServerInfo } from '../../utils' | 5 | import { flushTests, immutableAssign, killallServers, makeGetRequest, runServer, ServerInfo } from '../../../../shared/utils' |
6 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' | 6 | import { |
7 | checkBadCountPagination, | ||
8 | checkBadSortPagination, | ||
9 | checkBadStartPagination | ||
10 | } from '../../../../shared/utils/requests/check-api-params' | ||
7 | 11 | ||
8 | describe('Test videos API validator', function () { | 12 | describe('Test videos API validator', function () { |
9 | 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 fcde7e179..28591af9d 100644 --- a/server/tests/api/check-params/services.ts +++ b/server/tests/api/check-params/services.ts | |||
@@ -2,7 +2,15 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | 4 | ||
5 | import { flushTests, killallServers, makeGetRequest, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../utils' | 5 | import { |
6 | flushTests, | ||
7 | killallServers, | ||
8 | makeGetRequest, | ||
9 | runServer, | ||
10 | ServerInfo, | ||
11 | setAccessTokensToServers, | ||
12 | uploadVideo | ||
13 | } from '../../../../shared/utils' | ||
6 | 14 | ||
7 | describe('Test services API validators', function () { | 15 | describe('Test services API validators', function () { |
8 | let server: ServerInfo | 16 | let server: ServerInfo |
diff --git a/server/tests/api/check-params/user-subscriptions.ts b/server/tests/api/check-params/user-subscriptions.ts index 9fba99ac8..2cf5a2415 100644 --- a/server/tests/api/check-params/user-subscriptions.ts +++ b/server/tests/api/check-params/user-subscriptions.ts | |||
@@ -13,8 +13,12 @@ import { | |||
13 | ServerInfo, | 13 | ServerInfo, |
14 | setAccessTokensToServers, | 14 | setAccessTokensToServers, |
15 | userLogin | 15 | userLogin |
16 | } from '../../utils' | 16 | } from '../../../../shared/utils' |
17 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' | 17 | import { |
18 | checkBadCountPagination, | ||
19 | checkBadSortPagination, | ||
20 | checkBadStartPagination | ||
21 | } from '../../../../shared/utils/requests/check-api-params' | ||
18 | 22 | ||
19 | describe('Test user subscriptions API validators', function () { | 23 | describe('Test user subscriptions API validators', function () { |
20 | const path = '/api/v1/users/me/subscriptions' | 24 | 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 ec46609a4..f4c177621 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts | |||
@@ -9,11 +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 '../../utils' | 12 | } from '../../../../shared/utils' |
13 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' | 13 | import { |
14 | import { getMagnetURI, getMyVideoImports, getYoutubeVideoUrl, importVideo } from '../../utils/videos/video-imports' | 14 | checkBadCountPagination, |
15 | checkBadSortPagination, | ||
16 | checkBadStartPagination | ||
17 | } from '../../../../shared/utils/requests/check-api-params' | ||
18 | import { getMagnetURI, getMyVideoImports, getYoutubeVideoUrl, importVideo } from '../../../../shared/utils/videos/video-imports' | ||
15 | import { VideoPrivacy } from '../../../../shared/models/videos' | 19 | import { VideoPrivacy } from '../../../../shared/models/videos' |
16 | import { waitJobs } from '../../utils/server/jobs' | 20 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
17 | import { expect } from 'chai' | 21 | import { expect } from 'chai' |
18 | 22 | ||
19 | describe('Test users API validators', function () { | 23 | describe('Test users API validators', function () { |
diff --git a/server/tests/api/check-params/video-abuses.ts b/server/tests/api/check-params/video-abuses.ts index d2bed6a2a..a79ab4201 100644 --- a/server/tests/api/check-params/video-abuses.ts +++ b/server/tests/api/check-params/video-abuses.ts | |||
@@ -15,8 +15,12 @@ import { | |||
15 | updateVideoAbuse, | 15 | updateVideoAbuse, |
16 | uploadVideo, | 16 | uploadVideo, |
17 | userLogin | 17 | userLogin |
18 | } from '../../utils' | 18 | } from '../../../../shared/utils' |
19 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' | 19 | import { |
20 | checkBadCountPagination, | ||
21 | checkBadSortPagination, | ||
22 | checkBadStartPagination | ||
23 | } from '../../../../shared/utils/requests/check-api-params' | ||
20 | import { VideoAbuseState } from '../../../../shared/models/videos' | 24 | import { VideoAbuseState } from '../../../../shared/models/videos' |
21 | 25 | ||
22 | 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 473216236..8e1206db3 100644 --- a/server/tests/api/check-params/video-blacklist.ts +++ b/server/tests/api/check-params/video-blacklist.ts | |||
@@ -15,8 +15,12 @@ import { | |||
15 | setAccessTokensToServers, | 15 | setAccessTokensToServers, |
16 | uploadVideo, | 16 | uploadVideo, |
17 | userLogin | 17 | userLogin |
18 | } from '../../utils' | 18 | } from '../../../../shared/utils' |
19 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' | 19 | import { |
20 | checkBadCountPagination, | ||
21 | checkBadSortPagination, | ||
22 | checkBadStartPagination | ||
23 | } from '../../../../shared/utils/requests/check-api-params' | ||
20 | import { VideoDetails } from '../../../../shared/models/videos' | 24 | import { VideoDetails } from '../../../../shared/models/videos' |
21 | import { expect } from 'chai' | 25 | import { expect } from 'chai' |
22 | 26 | ||
diff --git a/server/tests/api/check-params/video-captions.ts b/server/tests/api/check-params/video-captions.ts index 8d46971a1..e4d36fd4f 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 '../../utils' | 16 | } from '../../../../shared/utils' |
17 | import { join } from 'path' | 17 | import { join } from 'path' |
18 | import { createVideoCaption } from '../../utils/videos/video-captions' | 18 | import { createVideoCaption } from '../../../../shared/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 e5696224d..14e4deaf7 100644 --- a/server/tests/api/check-params/video-channels.ts +++ b/server/tests/api/check-params/video-channels.ts | |||
@@ -20,8 +20,12 @@ import { | |||
20 | ServerInfo, | 20 | ServerInfo, |
21 | setAccessTokensToServers, | 21 | setAccessTokensToServers, |
22 | userLogin | 22 | userLogin |
23 | } from '../../utils' | 23 | } from '../../../../shared/utils' |
24 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' | 24 | import { |
25 | checkBadCountPagination, | ||
26 | checkBadSortPagination, | ||
27 | checkBadStartPagination | ||
28 | } from '../../../../shared/utils/requests/check-api-params' | ||
25 | import { User } from '../../../../shared/models/users' | 29 | import { User } from '../../../../shared/models/users' |
26 | import { join } from 'path' | 30 | import { join } from 'path' |
27 | 31 | ||
diff --git a/server/tests/api/check-params/video-comments.ts b/server/tests/api/check-params/video-comments.ts index 5241832fe..5981780ed 100644 --- a/server/tests/api/check-params/video-comments.ts +++ b/server/tests/api/check-params/video-comments.ts | |||
@@ -6,9 +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 '../../utils' | 9 | } from '../../../../shared/utils' |
10 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' | 10 | import { |
11 | import { addVideoCommentThread } from '../../utils/videos/video-comments' | 11 | checkBadCountPagination, |
12 | checkBadSortPagination, | ||
13 | checkBadStartPagination | ||
14 | } from '../../../../shared/utils/requests/check-api-params' | ||
15 | import { addVideoCommentThread } from '../../../../shared/utils/videos/video-comments' | ||
12 | 16 | ||
13 | const expect = chai.expect | 17 | const expect = chai.expect |
14 | 18 | ||
diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts index b51f3d2cd..7bf187007 100644 --- a/server/tests/api/check-params/video-imports.ts +++ b/server/tests/api/check-params/video-imports.ts | |||
@@ -18,9 +18,13 @@ import { | |||
18 | setAccessTokensToServers, | 18 | setAccessTokensToServers, |
19 | updateCustomSubConfig, | 19 | updateCustomSubConfig, |
20 | userLogin | 20 | userLogin |
21 | } from '../../utils' | 21 | } from '../../../../shared/utils' |
22 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' | 22 | import { |
23 | import { getMagnetURI, getYoutubeVideoUrl } from '../../utils/videos/video-imports' | 23 | checkBadCountPagination, |
24 | checkBadSortPagination, | ||
25 | checkBadStartPagination | ||
26 | } from '../../../../shared/utils/requests/check-api-params' | ||
27 | import { getMagnetURI, getYoutubeVideoUrl } from '../../../../shared/utils/videos/video-imports' | ||
24 | 28 | ||
25 | describe('Test video imports API validator', function () { | 29 | describe('Test video imports API validator', function () { |
26 | const path = '/api/v1/videos/imports' | 30 | const path = '/api/v1/videos/imports' |
diff --git a/server/tests/api/check-params/videos-filter.ts b/server/tests/api/check-params/videos-filter.ts index 784cd8ba1..e998c8a3d 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, | 12 | setAccessTokensToServers, |
13 | userLogin | 13 | userLogin |
14 | } from '../../utils' | 14 | } from '../../../../shared/utils' |
15 | import { UserRole } from '../../../../shared/models/users' | 15 | import { UserRole } from '../../../../shared/models/users' |
16 | 16 | ||
17 | const expect = chai.expect | 17 | const expect = chai.expect |
diff --git a/server/tests/api/check-params/videos-history.ts b/server/tests/api/check-params/videos-history.ts index 808c3b616..09c6f7861 100644 --- a/server/tests/api/check-params/videos-history.ts +++ b/server/tests/api/check-params/videos-history.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | ServerInfo, | 11 | ServerInfo, |
12 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
13 | uploadVideo | 13 | uploadVideo |
14 | } from '../../utils' | 14 | } from '../../../../shared/utils' |
15 | 15 | ||
16 | const expect = chai.expect | 16 | const expect = chai.expect |
17 | 17 | ||
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts index 699f135c7..d94eccf8e 100644 --- a/server/tests/api/check-params/videos.ts +++ b/server/tests/api/check-params/videos.ts | |||
@@ -8,9 +8,13 @@ import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enu | |||
8 | import { | 8 | import { |
9 | createUser, flushTests, getMyUserInformation, getVideo, getVideosList, immutableAssign, killallServers, makeDeleteRequest, | 9 | createUser, flushTests, getMyUserInformation, getVideo, getVideosList, immutableAssign, killallServers, makeDeleteRequest, |
10 | makeGetRequest, makeUploadRequest, makePutBodyRequest, removeVideo, runServer, ServerInfo, setAccessTokensToServers, userLogin | 10 | makeGetRequest, makeUploadRequest, makePutBodyRequest, removeVideo, runServer, ServerInfo, setAccessTokensToServers, userLogin |
11 | } from '../../utils' | 11 | } from '../../../../shared/utils' |
12 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' | 12 | import { |
13 | import { getAccountsList } from '../../utils/users/accounts' | 13 | checkBadCountPagination, |
14 | checkBadSortPagination, | ||
15 | checkBadStartPagination | ||
16 | } from '../../../../shared/utils/requests/check-api-params' | ||
17 | import { getAccountsList } from '../../../../shared/utils/users/accounts' | ||
14 | 18 | ||
15 | const expect = chai.expect | 19 | const expect = chai.expect |
16 | 20 | ||
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts index 1960854b6..0af52023c 100644 --- a/server/tests/api/redundancy/redundancy.ts +++ b/server/tests/api/redundancy/redundancy.ts | |||
@@ -18,15 +18,15 @@ import { | |||
18 | wait, | 18 | wait, |
19 | waitUntilLog, | 19 | waitUntilLog, |
20 | checkVideoFilesWereRemoved, removeVideo | 20 | checkVideoFilesWereRemoved, removeVideo |
21 | } from '../../utils' | 21 | } from '../../../../shared/utils' |
22 | import { waitJobs } from '../../utils/server/jobs' | 22 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
23 | import * as magnetUtil from 'magnet-uri' | 23 | import * as magnetUtil from 'magnet-uri' |
24 | import { updateRedundancy } from '../../utils/server/redundancy' | 24 | import { updateRedundancy } from '../../../../shared/utils/server/redundancy' |
25 | import { ActorFollow } from '../../../../shared/models/actors' | 25 | import { ActorFollow } from '../../../../shared/models/actors' |
26 | import { readdir } from 'fs-extra' | 26 | import { readdir } from 'fs-extra' |
27 | import { join } from 'path' | 27 | import { join } from 'path' |
28 | import { VideoRedundancyStrategy } from '../../../../shared/models/redundancy' | 28 | import { VideoRedundancyStrategy } from '../../../../shared/models/redundancy' |
29 | import { getStats } from '../../utils/server/stats' | 29 | import { getStats } from '../../../../shared/utils/server/stats' |
30 | import { ServerStats } from '../../../../shared/models/server/server-stats.model' | 30 | import { ServerStats } from '../../../../shared/models/server/server-stats.model' |
31 | 31 | ||
32 | const expect = chai.expect | 32 | 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 a287c5bdf..a411e973b 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 '../../utils' | 20 | } from '../../../../shared/utils' |
21 | import { waitJobs } from '../../utils/server/jobs' | 21 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
22 | import { VideoChannel } from '../../../../shared/models/videos' | 22 | import { VideoChannel } from '../../../../shared/models/videos' |
23 | import { searchVideoChannel } from '../../utils/search/video-channels' | 23 | import { searchVideoChannel } from '../../../../shared/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 28f4fac50..f881917e7 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 '../../utils' | 19 | } from '../../../../shared/utils' |
20 | import { waitJobs } from '../../utils/server/jobs' | 20 | import { waitJobs } from '../../../../shared/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 f1392ffea..50da837da 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 '../../utils' | 16 | } from '../../../../shared/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 facd1688d..c5c360a17 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts | |||
@@ -4,8 +4,11 @@ import 'mocha' | |||
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { About } from '../../../../shared/models/server/about.model' | 5 | import { About } from '../../../../shared/models/server/about.model' |
6 | import { CustomConfig } from '../../../../shared/models/server/custom-config.model' | 6 | import { CustomConfig } from '../../../../shared/models/server/custom-config.model' |
7 | import { deleteCustomConfig, getAbout, killallServers, reRunServer } from '../../utils' | ||
8 | import { | 7 | import { |
8 | deleteCustomConfig, | ||
9 | getAbout, | ||
10 | killallServers, | ||
11 | reRunServer, | ||
9 | flushTests, | 12 | flushTests, |
10 | getConfig, | 13 | getConfig, |
11 | getCustomConfig, | 14 | getCustomConfig, |
@@ -13,7 +16,7 @@ import { | |||
13 | runServer, | 16 | runServer, |
14 | setAccessTokensToServers, | 17 | setAccessTokensToServers, |
15 | updateCustomConfig | 18 | updateCustomConfig |
16 | } from '../../utils/index' | 19 | } from '../../../../shared/utils' |
17 | 20 | ||
18 | const expect = chai.expect | 21 | const expect = chai.expect |
19 | 22 | ||
diff --git a/server/tests/api/server/email.ts b/server/tests/api/server/email.ts index 713a27143..13df772c6 100644 --- a/server/tests/api/server/email.ts +++ b/server/tests/api/server/email.ts | |||
@@ -14,11 +14,14 @@ import { | |||
14 | unblockUser, | 14 | unblockUser, |
15 | uploadVideo, | 15 | uploadVideo, |
16 | userLogin, | 16 | userLogin, |
17 | verifyEmail | 17 | verifyEmail, |
18 | } from '../../utils' | 18 | flushTests, |
19 | import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from '../../utils/index' | 19 | killallServers, |
20 | import { mockSmtpServer } from '../../utils/miscs/email' | 20 | ServerInfo, |
21 | import { waitJobs } from '../../utils/server/jobs' | 21 | setAccessTokensToServers |
22 | } from '../../../../shared/utils' | ||
23 | import { mockSmtpServer } from '../../../../shared/utils/miscs/email' | ||
24 | import { waitJobs } from '../../../../shared/utils/server/jobs' | ||
22 | 25 | ||
23 | const expect = chai.expect | 26 | const expect = chai.expect |
24 | 27 | ||
diff --git a/server/tests/api/server/follows.ts b/server/tests/api/server/follows.ts index e80e93e7f..b0fc5d293 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 '../../utils' | 7 | import { completeVideoCheck } from '../../../../shared/utils' |
8 | import { | 8 | import { |
9 | flushAndRunMultipleServers, | 9 | flushAndRunMultipleServers, |
10 | getVideosList, | 10 | getVideosList, |
@@ -12,21 +12,26 @@ import { | |||
12 | ServerInfo, | 12 | ServerInfo, |
13 | setAccessTokensToServers, | 13 | setAccessTokensToServers, |
14 | uploadVideo | 14 | uploadVideo |
15 | } from '../../utils/index' | 15 | } from '../../../../shared/utils/index' |
16 | import { dateIsValid } from '../../utils/miscs/miscs' | 16 | import { dateIsValid } from '../../../../shared/utils/miscs/miscs' |
17 | import { follow, getFollowersListPaginationAndSort, getFollowingListPaginationAndSort, unfollow } from '../../utils/server/follows' | 17 | import { |
18 | import { expectAccountFollows } from '../../utils/users/accounts' | 18 | follow, |
19 | import { userLogin } from '../../utils/users/login' | 19 | getFollowersListPaginationAndSort, |
20 | import { createUser } from '../../utils/users/users' | 20 | getFollowingListPaginationAndSort, |
21 | unfollow | ||
22 | } from '../../../../shared/utils/server/follows' | ||
23 | import { expectAccountFollows } from '../../../../shared/utils/users/accounts' | ||
24 | import { userLogin } from '../../../../shared/utils/users/login' | ||
25 | import { createUser } from '../../../../shared/utils/users/users' | ||
21 | import { | 26 | import { |
22 | addVideoCommentReply, | 27 | addVideoCommentReply, |
23 | addVideoCommentThread, | 28 | addVideoCommentThread, |
24 | getVideoCommentThreads, | 29 | getVideoCommentThreads, |
25 | getVideoThreadComments | 30 | getVideoThreadComments |
26 | } from '../../utils/videos/video-comments' | 31 | } from '../../../../shared/utils/videos/video-comments' |
27 | import { rateVideo } from '../../utils/videos/videos' | 32 | import { rateVideo } from '../../../../shared/utils/videos/videos' |
28 | import { waitJobs } from '../../utils/server/jobs' | 33 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
29 | import { createVideoCaption, listVideoCaptions, testCaptionFile } from '../../utils/videos/video-captions' | 34 | import { createVideoCaption, listVideoCaptions, testCaptionFile } from '../../../../shared/utils/videos/video-captions' |
30 | import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model' | 35 | import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model' |
31 | 36 | ||
32 | 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 ed15c8090..e6e0d6c7a 100644 --- a/server/tests/api/server/handle-down.ts +++ b/server/tests/api/server/handle-down.ts | |||
@@ -5,8 +5,13 @@ import 'mocha' | |||
5 | import { JobState, Video } from '../../../../shared/models' | 5 | import { JobState, Video } from '../../../../shared/models' |
6 | import { VideoPrivacy } from '../../../../shared/models/videos' | 6 | import { VideoPrivacy } from '../../../../shared/models/videos' |
7 | import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' | 7 | import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' |
8 | import { completeVideoCheck, getVideo, immutableAssign, reRunServer, unfollow, viewVideo } from '../../utils' | ||
9 | import { | 8 | import { |
9 | completeVideoCheck, | ||
10 | getVideo, | ||
11 | immutableAssign, | ||
12 | reRunServer, | ||
13 | unfollow, | ||
14 | viewVideo, | ||
10 | flushAndRunMultipleServers, | 15 | flushAndRunMultipleServers, |
11 | getVideosList, | 16 | getVideosList, |
12 | killallServers, | 17 | killallServers, |
@@ -14,15 +19,15 @@ import { | |||
14 | setAccessTokensToServers, | 19 | setAccessTokensToServers, |
15 | uploadVideo, | 20 | uploadVideo, |
16 | wait | 21 | wait |
17 | } from '../../utils/index' | 22 | } from '../../../../shared/utils' |
18 | import { follow, getFollowersListPaginationAndSort } from '../../utils/server/follows' | 23 | import { follow, getFollowersListPaginationAndSort } from '../../../../shared/utils/server/follows' |
19 | import { getJobsListPaginationAndSort, waitJobs } from '../../utils/server/jobs' | 24 | import { getJobsListPaginationAndSort, waitJobs } from '../../../../shared/utils/server/jobs' |
20 | import { | 25 | import { |
21 | addVideoCommentReply, | 26 | addVideoCommentReply, |
22 | addVideoCommentThread, | 27 | addVideoCommentThread, |
23 | getVideoCommentThreads, | 28 | getVideoCommentThreads, |
24 | getVideoThreadComments | 29 | getVideoThreadComments |
25 | } from '../../utils/videos/video-comments' | 30 | } from '../../../../shared/utils/videos/video-comments' |
26 | 31 | ||
27 | const expect = chai.expect | 32 | const expect = chai.expect |
28 | 33 | ||
diff --git a/server/tests/api/server/jobs.ts b/server/tests/api/server/jobs.ts index cd59d9a1b..52948b1d6 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 '../../utils/index' | 5 | import { killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/utils/index' |
6 | import { doubleFollow } from '../../utils/server/follows' | 6 | import { doubleFollow } from '../../../../shared/utils/server/follows' |
7 | import { getJobsList, getJobsListPaginationAndSort, waitJobs } from '../../utils/server/jobs' | 7 | import { getJobsList, getJobsListPaginationAndSort, waitJobs } from '../../../../shared/utils/server/jobs' |
8 | import { flushAndRunMultipleServers } from '../../utils/server/servers' | 8 | import { flushAndRunMultipleServers } from '../../../../shared/utils/server/servers' |
9 | import { uploadVideo } from '../../utils/videos/videos' | 9 | import { uploadVideo } from '../../../../shared/utils/videos/videos' |
10 | import { dateIsValid } from '../../utils/miscs/miscs' | 10 | import { dateIsValid } from '../../../../shared/utils/miscs/miscs' |
11 | 11 | ||
12 | const expect = chai.expect | 12 | const expect = chai.expect |
13 | 13 | ||
diff --git a/server/tests/api/server/redundancy.ts b/server/tests/api/server/redundancy.ts index f50d6e3cf..8053d0491 100644 --- a/server/tests/api/server/redundancy.ts +++ b/server/tests/api/server/redundancy.ts | |||
@@ -18,15 +18,15 @@ import { | |||
18 | wait, | 18 | wait, |
19 | waitUntilLog, | 19 | waitUntilLog, |
20 | checkVideoFilesWereRemoved, removeVideo | 20 | checkVideoFilesWereRemoved, removeVideo |
21 | } from '../../utils' | 21 | } from '../../../../shared/utils' |
22 | import { waitJobs } from '../../utils/server/jobs' | 22 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
23 | import * as magnetUtil from 'magnet-uri' | 23 | import * as magnetUtil from 'magnet-uri' |
24 | import { updateRedundancy } from '../../utils/server/redundancy' | 24 | import { updateRedundancy } from '../../../../shared/utils/server/redundancy' |
25 | import { ActorFollow } from '../../../../shared/models/actors' | 25 | import { ActorFollow } from '../../../../shared/models/actors' |
26 | import { readdir } from 'fs-extra' | 26 | import { readdir } from 'fs-extra' |
27 | import { join } from 'path' | 27 | import { join } from 'path' |
28 | import { VideoRedundancyStrategy } from '../../../../shared/models/redundancy' | 28 | import { VideoRedundancyStrategy } from '../../../../shared/models/redundancy' |
29 | import { getStats } from '../../utils/server/stats' | 29 | import { getStats } from '../../../../shared/utils/server/stats' |
30 | import { ServerStats } from '../../../../shared/models/server/server-stats.model' | 30 | import { ServerStats } from '../../../../shared/models/server/server-stats.model' |
31 | 31 | ||
32 | const expect = chai.expect | 32 | const expect = chai.expect |
diff --git a/server/tests/api/server/reverse-proxy.ts b/server/tests/api/server/reverse-proxy.ts index e2c2a293e..d4c08c346 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 '../../utils' | 18 | } from '../../../../shared/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 '../../utils/index' | 26 | } from '../../../../shared/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 cb229e876..517b4e542 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 '../../utils' | 16 | } from '../../../../shared/utils' |
17 | import { flushTests, setAccessTokensToServers } from '../../utils/index' | 17 | import { flushTests, setAccessTokensToServers } from '../../../../shared/utils/index' |
18 | import { getStats } from '../../utils/server/stats' | 18 | import { getStats } from '../../../../shared/utils/server/stats' |
19 | import { addVideoCommentThread } from '../../utils/videos/video-comments' | 19 | import { addVideoCommentThread } from '../../../../shared/utils/videos/video-comments' |
20 | import { waitJobs } from '../../utils/server/jobs' | 20 | import { waitJobs } from '../../../../shared/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 856f2f4d1..25ca00029 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, runServer, ServerInfo, uploadVideo } from '../../utils' | 5 | import { getVideo, killallServers, runServer, ServerInfo, uploadVideo } from '../../../../shared/utils' |
6 | import { flushTests, setAccessTokensToServers } from '../../utils/index' | 6 | import { flushTests, setAccessTokensToServers } from '../../../../shared/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 eed4b9f3e..4bca27a94 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 '../../utils/index' | 15 | } from '../../../../shared/utils/index' |
16 | import { setAccessTokensToServers } from '../../utils/users/login' | 16 | import { setAccessTokensToServers } from '../../../../shared/utils/users/login' |
17 | import { getVideosListWithToken, getVideosList } from '../../utils/videos/videos' | 17 | import { getVideosListWithToken, getVideosList } from '../../../../shared/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 '../../utils/videos/video-comments' | 23 | } from '../../../../shared/utils/videos/video-comments' |
24 | import { waitJobs } from '../../utils/server/jobs' | 24 | import { waitJobs } from '../../../../shared/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 '../../utils/users/blocklist' | 39 | } from '../../../../shared/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 65b80540c..88a7187d6 100644 --- a/server/tests/api/users/user-subscriptions.ts +++ b/server/tests/api/users/user-subscriptions.ts | |||
@@ -2,18 +2,27 @@ | |||
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { createUser, doubleFollow, flushAndRunMultipleServers, follow, getVideosList, unfollow, updateVideo, userLogin } from '../../utils' | 5 | import { |
6 | import { killallServers, ServerInfo, uploadVideo } from '../../utils/index' | 6 | createUser, |
7 | import { setAccessTokensToServers } from '../../utils/users/login' | 7 | doubleFollow, |
8 | flushAndRunMultipleServers, | ||
9 | follow, | ||
10 | getVideosList, | ||
11 | unfollow, | ||
12 | updateVideo, | ||
13 | userLogin | ||
14 | } from '../../../../shared/utils' | ||
15 | import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/utils/index' | ||
16 | import { setAccessTokensToServers } from '../../../../shared/utils/users/login' | ||
8 | import { Video, VideoChannel } from '../../../../shared/models/videos' | 17 | import { Video, VideoChannel } from '../../../../shared/models/videos' |
9 | import { waitJobs } from '../../utils/server/jobs' | 18 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
10 | import { | 19 | import { |
11 | addUserSubscription, | 20 | addUserSubscription, |
12 | listUserSubscriptions, | 21 | listUserSubscriptions, |
13 | listUserSubscriptionVideos, | 22 | listUserSubscriptionVideos, |
14 | removeUserSubscription, | 23 | removeUserSubscription, |
15 | getUserSubscription, areSubscriptionsExist | 24 | getUserSubscription, areSubscriptionsExist |
16 | } from '../../utils/users/user-subscriptions' | 25 | } from '../../../../shared/utils/users/user-subscriptions' |
17 | 26 | ||
18 | const expect = chai.expect | 27 | const expect = chai.expect |
19 | 28 | ||
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts index d8699db17..006d6cdf0 100644 --- a/server/tests/api/users/users-multiple-servers.ts +++ b/server/tests/api/users/users-multiple-servers.ts | |||
@@ -13,13 +13,13 @@ import { | |||
13 | removeUser, | 13 | removeUser, |
14 | updateMyUser, | 14 | updateMyUser, |
15 | userLogin | 15 | userLogin |
16 | } from '../../utils' | 16 | } from '../../../../shared/utils' |
17 | import { getMyUserInformation, killallServers, ServerInfo, testImage, updateMyAvatar, uploadVideo } from '../../utils/index' | 17 | import { getMyUserInformation, killallServers, ServerInfo, testImage, updateMyAvatar, uploadVideo } from '../../../../shared/utils/index' |
18 | import { checkActorFilesWereRemoved, getAccount, getAccountsList } from '../../utils/users/accounts' | 18 | import { checkActorFilesWereRemoved, getAccount, getAccountsList } from '../../../../shared/utils/users/accounts' |
19 | import { setAccessTokensToServers } from '../../utils/users/login' | 19 | import { setAccessTokensToServers } from '../../../../shared/utils/users/login' |
20 | import { User } from '../../../../shared/models/users' | 20 | import { User } from '../../../../shared/models/users' |
21 | import { VideoChannel } from '../../../../shared/models/videos' | 21 | import { VideoChannel } from '../../../../shared/models/videos' |
22 | import { waitJobs } from '../../utils/server/jobs' | 22 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
23 | 23 | ||
24 | const expect = chai.expect | 24 | const expect = chai.expect |
25 | 25 | ||
diff --git a/server/tests/api/users/users-verification.ts b/server/tests/api/users/users-verification.ts index fa5f5e371..b1733e45e 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 | 7 | userLogin, login, runServer, ServerInfo, verifyEmail, updateCustomSubConfig |
8 | } from '../../utils' | 8 | } from '../../../../shared/utils' |
9 | import { setAccessTokensToServers } from '../../utils/users/login' | 9 | import { setAccessTokensToServers } from '../../../../shared/utils/users/login' |
10 | import { mockSmtpServer } from '../../utils/miscs/email' | 10 | import { mockSmtpServer } from '../../../../shared/utils/miscs/email' |
11 | import { waitJobs } from '../../utils/server/jobs' | 11 | import { waitJobs } from '../../../../shared/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 513bca8a0..7dffbb0b1 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts | |||
@@ -32,10 +32,10 @@ import { | |||
32 | updateUser, | 32 | updateUser, |
33 | uploadVideo, | 33 | uploadVideo, |
34 | userLogin | 34 | userLogin |
35 | } from '../../utils/index' | 35 | } from '../../../../shared/utils/index' |
36 | import { follow } from '../../utils/server/follows' | 36 | import { follow } from '../../../../shared/utils/server/follows' |
37 | import { setAccessTokensToServers } from '../../utils/users/login' | 37 | import { setAccessTokensToServers } from '../../../../shared/utils/users/login' |
38 | import { getMyVideos } from '../../utils/videos/videos' | 38 | import { getMyVideos } from '../../../../shared/utils/videos/videos' |
39 | 39 | ||
40 | const expect = chai.expect | 40 | const expect = chai.expect |
41 | 41 | ||
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index b9ace2885..aa38b6b33 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -31,15 +31,15 @@ import { | |||
31 | viewVideo, | 31 | viewVideo, |
32 | wait, | 32 | wait, |
33 | webtorrentAdd | 33 | webtorrentAdd |
34 | } from '../../utils' | 34 | } from '../../../../shared/utils' |
35 | import { | 35 | import { |
36 | addVideoCommentReply, | 36 | addVideoCommentReply, |
37 | addVideoCommentThread, | 37 | addVideoCommentThread, |
38 | deleteVideoComment, | 38 | deleteVideoComment, |
39 | getVideoCommentThreads, | 39 | getVideoCommentThreads, |
40 | getVideoThreadComments | 40 | getVideoThreadComments |
41 | } from '../../utils/videos/video-comments' | 41 | } from '../../../../shared/utils/videos/video-comments' |
42 | import { waitJobs } from '../../utils/server/jobs' | 42 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
43 | 43 | ||
44 | const expect = chai.expect | 44 | const expect = chai.expect |
45 | 45 | ||
diff --git a/server/tests/api/videos/services.ts b/server/tests/api/videos/services.ts index 2f1424292..2da86964f 100644 --- a/server/tests/api/videos/services.ts +++ b/server/tests/api/videos/services.ts | |||
@@ -2,8 +2,16 @@ | |||
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { flushTests, getOEmbed, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../utils/index' | 5 | import { |
6 | import { runServer } from '../../utils/server/servers' | 6 | flushTests, |
7 | getOEmbed, | ||
8 | getVideosList, | ||
9 | killallServers, | ||
10 | ServerInfo, | ||
11 | setAccessTokensToServers, | ||
12 | uploadVideo | ||
13 | } from '../../../../shared/utils/index' | ||
14 | import { runServer } from '../../../../shared/utils/server/servers' | ||
7 | 15 | ||
8 | const expect = chai.expect | 16 | const expect = chai.expect |
9 | 17 | ||
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index 089c3df25..069dec67c 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 '../../utils' | 31 | } from '../../../../shared/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 a17f3c8de..3a7b623da 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 '../../utils/index' | 17 | } from '../../../../shared/utils/index' |
18 | import { doubleFollow } from '../../utils/server/follows' | 18 | import { doubleFollow } from '../../../../shared/utils/server/follows' |
19 | import { waitJobs } from '../../utils/server/jobs' | 19 | import { waitJobs } from '../../../../shared/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-management.ts b/server/tests/api/videos/video-blacklist-management.ts index 7bf39dc99..06d80a270 100644 --- a/server/tests/api/videos/video-blacklist-management.ts +++ b/server/tests/api/videos/video-blacklist-management.ts | |||
@@ -16,9 +16,9 @@ import { | |||
16 | setAccessTokensToServers, | 16 | setAccessTokensToServers, |
17 | updateVideoBlacklist, | 17 | updateVideoBlacklist, |
18 | uploadVideo | 18 | uploadVideo |
19 | } from '../../utils/index' | 19 | } from '../../../../shared/utils/index' |
20 | import { doubleFollow } from '../../utils/server/follows' | 20 | import { doubleFollow } from '../../../../shared/utils/server/follows' |
21 | import { waitJobs } from '../../utils/server/jobs' | 21 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
22 | import { VideoAbuse } from '../../../../shared/models/videos' | 22 | import { VideoAbuse } from '../../../../shared/models/videos' |
23 | 23 | ||
24 | const expect = chai.expect | 24 | const expect = chai.expect |
diff --git a/server/tests/api/videos/video-blacklist.ts b/server/tests/api/videos/video-blacklist.ts index de4c68f1d..1cce82d2a 100644 --- a/server/tests/api/videos/video-blacklist.ts +++ b/server/tests/api/videos/video-blacklist.ts | |||
@@ -11,9 +11,9 @@ import { | |||
11 | ServerInfo, | 11 | ServerInfo, |
12 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
13 | uploadVideo | 13 | uploadVideo |
14 | } from '../../utils/index' | 14 | } from '../../../../shared/utils/index' |
15 | import { doubleFollow } from '../../utils/server/follows' | 15 | import { doubleFollow } from '../../../../shared/utils/server/follows' |
16 | import { waitJobs } from '../../utils/server/jobs' | 16 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
17 | 17 | ||
18 | const expect = chai.expect | 18 | const expect = chai.expect |
19 | 19 | ||
diff --git a/server/tests/api/videos/video-captions.ts b/server/tests/api/videos/video-captions.ts index 6e441410d..57bee713f 100644 --- a/server/tests/api/videos/video-captions.ts +++ b/server/tests/api/videos/video-captions.ts | |||
@@ -2,10 +2,17 @@ | |||
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { checkVideoFilesWereRemoved, doubleFollow, flushAndRunMultipleServers, removeVideo, uploadVideo, wait } from '../../utils' | 5 | import { |
6 | import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from '../../utils/index' | 6 | checkVideoFilesWereRemoved, |
7 | import { waitJobs } from '../../utils/server/jobs' | 7 | doubleFollow, |
8 | import { createVideoCaption, deleteVideoCaption, listVideoCaptions, testCaptionFile } from '../../utils/videos/video-captions' | 8 | flushAndRunMultipleServers, |
9 | removeVideo, | ||
10 | uploadVideo, | ||
11 | wait | ||
12 | } from '../../../../shared/utils' | ||
13 | import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/utils/index' | ||
14 | import { waitJobs } from '../../../../shared/utils/server/jobs' | ||
15 | import { createVideoCaption, deleteVideoCaption, listVideoCaptions, testCaptionFile } from '../../../../shared/utils/videos/video-captions' | ||
9 | import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model' | 16 | import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model' |
10 | 17 | ||
11 | const expect = chai.expect | 18 | 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 1578a471d..25675a966 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 '../../utils' | 21 | } from '../../../../shared/utils' |
22 | import { waitJobs } from '../../utils/server/jobs' | 22 | import { waitJobs } from '../../../../shared/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 8138c65d6..5bffffc66 100644 --- a/server/tests/api/videos/video-channels.ts +++ b/server/tests/api/videos/video-channels.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | updateVideo, | 11 | updateVideo, |
12 | updateVideoChannelAvatar, | 12 | updateVideoChannelAvatar, |
13 | uploadVideo, wait, userLogin | 13 | uploadVideo, wait, userLogin |
14 | } from '../../utils' | 14 | } from '../../../../shared/utils' |
15 | import { | 15 | import { |
16 | addVideoChannel, | 16 | addVideoChannel, |
17 | deleteVideoChannel, | 17 | deleteVideoChannel, |
@@ -24,8 +24,8 @@ import { | |||
24 | ServerInfo, | 24 | ServerInfo, |
25 | setAccessTokensToServers, | 25 | setAccessTokensToServers, |
26 | updateVideoChannel | 26 | updateVideoChannel |
27 | } from '../../utils/index' | 27 | } from '../../../../shared/utils/index' |
28 | import { waitJobs } from '../../utils/server/jobs' | 28 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
29 | 29 | ||
30 | const expect = chai.expect | 30 | const expect = chai.expect |
31 | 31 | ||
diff --git a/server/tests/api/videos/video-comments.ts b/server/tests/api/videos/video-comments.ts index d6e07c5b3..ce1b17e35 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 '../../utils' | 6 | import { testImage } from '../../../../shared/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 '../../utils/index' | 16 | } from '../../../../shared/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 '../../utils/videos/video-comments' | 23 | } from '../../../../shared/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 dd5cd78c0..cbda0b9a6 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 '../../utils/index' | 15 | } from '../../../../shared/utils/index' |
16 | import { doubleFollow } from '../../utils/server/follows' | 16 | import { doubleFollow } from '../../../../shared/utils/server/follows' |
17 | import { waitJobs } from '../../utils/server/jobs' | 17 | import { waitJobs } from '../../../../shared/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-imports.ts b/server/tests/api/videos/video-imports.ts index aaee79a4a..cd4988553 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 '../../utils' | 17 | } from '../../../../shared/utils' |
18 | import { waitJobs } from '../../utils/server/jobs' | 18 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
19 | import { getMagnetURI, getYoutubeVideoUrl, importVideo, getMyVideoImports } from '../../utils/videos/video-imports' | 19 | import { getMagnetURI, getYoutubeVideoUrl, importVideo, getMyVideoImports } from '../../../../shared/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 eab7a6991..df1ee2eb9 100644 --- a/server/tests/api/videos/video-nsfw.ts +++ b/server/tests/api/videos/video-nsfw.ts | |||
@@ -2,10 +2,17 @@ | |||
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { flushTests, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../utils/index' | 5 | import { |
6 | import { userLogin } from '../../utils/users/login' | 6 | flushTests, |
7 | import { createUser } from '../../utils/users/users' | 7 | getVideosList, |
8 | import { getMyVideos } from '../../utils/videos/videos' | 8 | killallServers, |
9 | ServerInfo, | ||
10 | setAccessTokensToServers, | ||
11 | uploadVideo | ||
12 | } from '../../../../shared/utils/index' | ||
13 | import { userLogin } from '../../../../shared/utils/users/login' | ||
14 | import { createUser } from '../../../../shared/utils/users/users' | ||
15 | import { getMyVideos } from '../../../../shared/utils/videos/videos' | ||
9 | import { | 16 | import { |
10 | getAccountVideos, | 17 | getAccountVideos, |
11 | getConfig, | 18 | getConfig, |
@@ -18,7 +25,7 @@ import { | |||
18 | searchVideoWithToken, | 25 | searchVideoWithToken, |
19 | updateCustomConfig, | 26 | updateCustomConfig, |
20 | updateMyUser | 27 | updateMyUser |
21 | } from '../../utils' | 28 | } from '../../../../shared/utils' |
22 | import { ServerConfig } from '../../../../shared/models' | 29 | import { ServerConfig } from '../../../../shared/models' |
23 | import { CustomConfig } from '../../../../shared/models/server/custom-config.model' | 30 | import { CustomConfig } from '../../../../shared/models/server/custom-config.model' |
24 | import { User } from '../../../../shared/models/users' | 31 | import { User } from '../../../../shared/models/users' |
diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts index 9fefca7e3..0b4e66369 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 '../../utils/index' | 13 | } from '../../../../shared/utils/index' |
14 | import { doubleFollow } from '../../utils/server/follows' | 14 | import { doubleFollow } from '../../../../shared/utils/server/follows' |
15 | import { userLogin } from '../../utils/users/login' | 15 | import { userLogin } from '../../../../shared/utils/users/login' |
16 | import { createUser } from '../../utils/users/users' | 16 | import { createUser } from '../../../../shared/utils/users/users' |
17 | import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../utils/videos/videos' | 17 | import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../../../shared/utils/videos/videos' |
18 | import { waitJobs } from '../../utils/server/jobs' | 18 | import { waitJobs } from '../../../../shared/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 a260fa4da..ecfc5e034 100644 --- a/server/tests/api/videos/video-schedule-update.ts +++ b/server/tests/api/videos/video-schedule-update.ts | |||
@@ -15,9 +15,9 @@ import { | |||
15 | updateVideo, | 15 | updateVideo, |
16 | uploadVideo, | 16 | uploadVideo, |
17 | wait | 17 | wait |
18 | } from '../../utils' | 18 | } from '../../../../shared/utils' |
19 | import { join } from 'path' | 19 | import { join } from 'path' |
20 | import { waitJobs } from '../../utils/server/jobs' | 20 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
21 | 21 | ||
22 | const expect = chai.expect | 22 | const expect = chai.expect |
23 | 23 | ||
diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts index 85795d2ed..f9458f0ec 100644 --- a/server/tests/api/videos/video-transcoder.ts +++ b/server/tests/api/videos/video-transcoder.ts | |||
@@ -20,9 +20,9 @@ import { | |||
20 | uploadVideo, | 20 | uploadVideo, |
21 | webtorrentAdd, | 21 | webtorrentAdd, |
22 | generateHighBitrateVideo | 22 | generateHighBitrateVideo |
23 | } from '../../utils' | 23 | } from '../../../../shared/utils' |
24 | import { join } from 'path' | 24 | import { join } from 'path' |
25 | import { waitJobs } from '../../utils/server/jobs' | 25 | import { waitJobs } from '../../../../shared/utils/server/jobs' |
26 | import { pathExists } from 'fs-extra' | 26 | import { pathExists } from 'fs-extra' |
27 | import { VIDEO_TRANSCODING_FPS } from '../../../../server/initializers/constants' | 27 | import { VIDEO_TRANSCODING_FPS } from '../../../../server/initializers/constants' |
28 | 28 | ||
diff --git a/server/tests/api/videos/videos-filter.ts b/server/tests/api/videos/videos-filter.ts index a7588129f..59e37ad86 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 '../../utils' | 16 | } from '../../../../shared/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 6d289b288..40ae94f79 100644 --- a/server/tests/api/videos/videos-history.ts +++ b/server/tests/api/videos/videos-history.ts | |||
@@ -11,9 +11,9 @@ import { | |||
11 | ServerInfo, | 11 | ServerInfo, |
12 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
13 | uploadVideo | 13 | uploadVideo |
14 | } from '../../utils' | 14 | } from '../../../../shared/utils' |
15 | import { Video, VideoDetails } from '../../../../shared/models/videos' | 15 | import { Video, VideoDetails } from '../../../../shared/models/videos' |
16 | import { userWatchVideo } from '../../utils/videos/video-history' | 16 | import { userWatchVideo } from '../../../../shared/utils/videos/video-history' |
17 | 17 | ||
18 | const expect = chai.expect | 18 | const expect = chai.expect |
19 | 19 | ||
diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts index 7d1f29c92..7221bcae6 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 '../../utils' | 5 | import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/utils' |
6 | import { getVideosOverview } from '../../utils/overviews/overviews' | 6 | import { getVideosOverview } from '../../../../shared/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 |