aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/multiple-servers.ts6
-rw-r--r--server/tests/api/videos/services.ts4
-rw-r--r--server/tests/api/videos/single-server.ts2
-rw-r--r--server/tests/api/videos/video-abuse.ts6
-rw-r--r--server/tests/api/videos/video-blacklist.ts6
-rw-r--r--server/tests/api/videos/video-captions.ts13
-rw-r--r--server/tests/api/videos/video-change-ownership.ts4
-rw-r--r--server/tests/api/videos/video-channels.ts6
-rw-r--r--server/tests/api/videos/video-comments.ts6
-rw-r--r--server/tests/api/videos/video-description.ts6
-rw-r--r--server/tests/api/videos/video-hls.ts2
-rw-r--r--server/tests/api/videos/video-imports.ts6
-rw-r--r--server/tests/api/videos/video-nsfw.ts10
-rw-r--r--server/tests/api/videos/video-playlists.ts2
-rw-r--r--server/tests/api/videos/video-privacy.ts12
-rw-r--r--server/tests/api/videos/video-schedule-update.ts4
-rw-r--r--server/tests/api/videos/video-transcoder.ts4
-rw-r--r--server/tests/api/videos/videos-filter.ts2
-rw-r--r--server/tests/api/videos/videos-history.ts4
-rw-r--r--server/tests/api/videos/videos-overview.ts4
-rw-r--r--server/tests/api/videos/videos-views-cleaner.ts6
21 files changed, 60 insertions, 55 deletions
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'
36import { 36import {
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'
43import { waitJobs } from '../../../../shared/utils/server/jobs' 43import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
44 44
45const expect = chai.expect 45const 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'
14import { runServer } from '../../../../shared/utils/server/servers' 14import { runServer } from '../../../../shared/extra-utils/server/servers'
15 15
16const expect = chai.expect 16const 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
33const expect = chai.expect 33const 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'
18import { doubleFollow } from '../../../../shared/utils/server/follows' 18import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
19import { waitJobs } from '../../../../shared/utils/server/jobs' 19import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
20 20
21const expect = chai.expect 21const 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'
24import { doubleFollow } from '../../../../shared/utils/server/follows' 24import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
25import { waitJobs } from '../../../../shared/utils/server/jobs' 25import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
26import { VideoBlacklist, VideoBlacklistType } from '../../../../shared/models/videos' 26import { VideoBlacklist, VideoBlacklistType } from '../../../../shared/models/videos'
27import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' 27import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
28import { UserRole } from '../../../../shared/models/users' 28import { 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'
13import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/utils/index' 13import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from '../../../../shared/extra-utils/index'
14import { waitJobs } from '../../../../shared/utils/server/jobs' 14import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
15import { createVideoCaption, deleteVideoCaption, listVideoCaptions, testCaptionFile } from '../../../../shared/utils/videos/video-captions' 15import {
16 createVideoCaption,
17 deleteVideoCaption,
18 listVideoCaptions,
19 testCaptionFile
20} from '../../../../shared/extra-utils/videos/video-captions'
16import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model' 21import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
17 22
18const expect = chai.expect 23const 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'
22import { waitJobs } from '../../../../shared/utils/server/jobs' 22import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
23import { User } from '../../../../shared/models/users' 23import { User } from '../../../../shared/models/users'
24import { VideoDetails } from '../../../../shared/models/videos' 24import { 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'
17import { 17import {
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'
30import { waitJobs } from '../../../../shared/utils/server/jobs' 30import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
31 31
32const expect = chai.expect 32const 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 @@
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' 5import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
6import { testImage } from '../../../../shared/utils' 6import { testImage } from '../../../../shared/extra-utils'
7import { 7import {
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'
17import { 17import {
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
25const expect = chai.expect 25const 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'
16import { doubleFollow } from '../../../../shared/utils/server/follows' 16import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
17import { waitJobs } from '../../../../shared/utils/server/jobs' 17import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
18 18
19const expect = chai.expect 19const 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'
22import { VideoDetails } from '../../../../shared/models/videos' 22import { VideoDetails } from '../../../../shared/models/videos'
23import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type' 23import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type'
24import { join } from 'path' 24import { 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'
18import { waitJobs } from '../../../../shared/utils/server/jobs' 18import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
19import { getMagnetURI, getYoutubeVideoUrl, importVideo, getMyVideoImports } from '../../../../shared/utils/videos/video-imports' 19import { getMagnetURI, getYoutubeVideoUrl, importVideo, getMyVideoImports } from '../../../../shared/extra-utils/videos/video-imports'
20 20
21const expect = chai.expect 21const 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'
13import { userLogin } from '../../../../shared/utils/users/login' 13import { userLogin } from '../../../../shared/extra-utils/users/login'
14import { createUser } from '../../../../shared/utils/users/users' 14import { createUser } from '../../../../shared/extra-utils/users/users'
15import { getMyVideos } from '../../../../shared/utils/videos/videos' 15import { getMyVideos } from '../../../../shared/extra-utils/videos/videos'
16import { 16import {
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'
29import { ServerConfig } from '../../../../shared/models' 29import { ServerConfig } from '../../../../shared/models'
30import { CustomConfig } from '../../../../shared/models/server/custom-config.model' 30import { CustomConfig } from '../../../../shared/models/server/custom-config.model'
31import { User } from '../../../../shared/models/users' 31import { 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'
40import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' 40import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
41import { VideoPlaylist } from '../../../../shared/models/videos/playlist/video-playlist.model' 41import { VideoPlaylist } from '../../../../shared/models/videos/playlist/video-playlist.model'
42import { Video } from '../../../../shared/models/videos' 42import { 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'
14import { doubleFollow } from '../../../../shared/utils/server/follows' 14import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
15import { userLogin } from '../../../../shared/utils/users/login' 15import { userLogin } from '../../../../shared/extra-utils/users/login'
16import { createUser } from '../../../../shared/utils/users/users' 16import { createUser } from '../../../../shared/extra-utils/users/users'
17import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../../../shared/utils/videos/videos' 17import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../../../shared/extra-utils/videos/videos'
18import { waitJobs } from '../../../../shared/utils/server/jobs' 18import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
19 19
20const expect = chai.expect 20const 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'
19import { waitJobs } from '../../../../shared/utils/server/jobs' 19import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
20 20
21const expect = chai.expect 21const 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'
23import { extname, join } from 'path' 23import { extname, join } from 'path'
24import { waitJobs } from '../../../../shared/utils/server/jobs' 24import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
25import { VIDEO_TRANSCODING_FPS } from '../../../../server/initializers/constants' 25import { VIDEO_TRANSCODING_FPS } from '../../../../server/initializers/constants'
26 26
27const expect = chai.expect 27const 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'
17import { Video, VideoPrivacy } from '../../../../shared/models/videos' 17import { Video, VideoPrivacy } from '../../../../shared/models/videos'
18import { UserRole } from '../../../../shared/models/users' 18import { 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'
20import { Video, VideoDetails } from '../../../../shared/models/videos' 20import { Video, VideoDetails } from '../../../../shared/models/videos'
21import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '../../../../shared/utils/videos/video-history' 21import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '../../../../shared/extra-utils/videos/video-history'
22 22
23const expect = chai.expect 23const 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
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/utils' 5import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/extra-utils'
6import { getVideosOverview } from '../../../../shared/utils/overviews/overviews' 6import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews'
7import { VideosOverview } from '../../../../shared/models/overviews' 7import { VideosOverview } from '../../../../shared/models/overviews'
8 8
9const expect = chai.expect 9const 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'
15import { getVideosOverview } from '../../../../shared/utils/overviews/overviews' 15import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews'
16import { VideosOverview } from '../../../../shared/models/overviews' 16import { VideosOverview } from '../../../../shared/models/overviews'
17import { listMyVideosHistory } from '../../../../shared/utils/videos/video-history' 17import { listMyVideosHistory } from '../../../../shared/extra-utils/videos/video-history'
18 18
19const expect = chai.expect 19const expect = chai.expect
20 20