diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-17 11:58:15 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-17 12:24:03 +0100 |
commit | c55e3d7227fe1453869e309025996b9d75256d5d (patch) | |
tree | 08e9b0ca210d75c82c8606fef0852eca020e8e0e /server/tests/api/videos | |
parent | bf54587a3e2ad9c2c186828f2a5682b91ee2cc00 (diff) | |
download | PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.gz PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.zst PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.zip |
Move test functions outside extra-utils
Diffstat (limited to 'server/tests/api/videos')
20 files changed, 86 insertions, 102 deletions
diff --git a/server/tests/api/videos/audio-only.ts b/server/tests/api/videos/audio-only.ts index 4b27f2fbe..e58360ffe 100644 --- a/server/tests/api/videos/audio-only.ts +++ b/server/tests/api/videos/audio-only.ts | |||
@@ -3,7 +3,14 @@ | |||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils' | 5 | import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils' |
6 | import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' | 6 | import { |
7 | cleanupTests, | ||
8 | createMultipleServers, | ||
9 | doubleFollow, | ||
10 | PeerTubeServer, | ||
11 | setAccessTokensToServers, | ||
12 | waitJobs | ||
13 | } from '@shared/server-commands' | ||
7 | 14 | ||
8 | const expect = chai.expect | 15 | const expect = chai.expect |
9 | 16 | ||
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index cb83fa0f0..9fa03f1a9 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -4,23 +4,24 @@ import 'mocha' | |||
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import request from 'supertest' | 5 | import request from 'supertest' |
6 | import { | 6 | import { |
7 | buildAbsoluteFixturePath, | ||
8 | checkTmpIsEmpty, | 7 | checkTmpIsEmpty, |
9 | checkVideoFilesWereRemoved, | 8 | checkVideoFilesWereRemoved, |
9 | completeVideoCheck, | ||
10 | dateIsValid, | ||
11 | saveVideoInServers, | ||
12 | testImage | ||
13 | } from '@server/tests/shared' | ||
14 | import { buildAbsoluteFixturePath, wait } from '@shared/core-utils' | ||
15 | import { HttpStatusCode, VideoCommentThreadTree, VideoPrivacy } from '@shared/models' | ||
16 | import { | ||
10 | cleanupTests, | 17 | cleanupTests, |
11 | createMultipleServers, | 18 | createMultipleServers, |
12 | dateIsValid, | ||
13 | doubleFollow, | 19 | doubleFollow, |
14 | PeerTubeServer, | 20 | PeerTubeServer, |
15 | saveVideoInServers, | ||
16 | setAccessTokensToServers, | 21 | setAccessTokensToServers, |
17 | testImage, | ||
18 | wait, | ||
19 | waitJobs, | 22 | waitJobs, |
20 | webtorrentAdd | 23 | webtorrentAdd |
21 | } from '@shared/server-commands' | 24 | } from '@shared/server-commands' |
22 | import { HttpStatusCode, VideoCommentThreadTree, VideoPrivacy } from '@shared/models' | ||
23 | import { completeVideoCheck } from '@server/tests/shared/video' | ||
24 | 25 | ||
25 | const expect = chai.expect | 26 | const expect = chai.expect |
26 | 27 | ||
diff --git a/server/tests/api/videos/resumable-upload.ts b/server/tests/api/videos/resumable-upload.ts index 0842817dc..d6f4da630 100644 --- a/server/tests/api/videos/resumable-upload.ts +++ b/server/tests/api/videos/resumable-upload.ts | |||
@@ -4,15 +4,9 @@ import 'mocha' | |||
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { pathExists, readdir, stat } from 'fs-extra' | 5 | import { pathExists, readdir, stat } from 'fs-extra' |
6 | import { join } from 'path' | 6 | import { join } from 'path' |
7 | import { | 7 | import { buildAbsoluteFixturePath } from '@shared/core-utils' |
8 | buildAbsoluteFixturePath, | ||
9 | cleanupTests, | ||
10 | createSingleServer, | ||
11 | PeerTubeServer, | ||
12 | setAccessTokensToServers, | ||
13 | setDefaultVideoChannel | ||
14 | } from '@shared/server-commands' | ||
15 | import { HttpStatusCode, VideoPrivacy } from '@shared/models' | 8 | import { HttpStatusCode, VideoPrivacy } from '@shared/models' |
9 | import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands' | ||
16 | 10 | ||
17 | const expect = chai.expect | 11 | const expect = chai.expect |
18 | 12 | ||
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index e5e12dd19..28bf018c5 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts | |||
@@ -2,17 +2,10 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { | 5 | import { checkVideoFilesWereRemoved, completeVideoCheck, testImage } from '@server/tests/shared' |
6 | checkVideoFilesWereRemoved, | 6 | import { wait } from '@shared/core-utils' |
7 | cleanupTests, | ||
8 | createSingleServer, | ||
9 | PeerTubeServer, | ||
10 | setAccessTokensToServers, | ||
11 | testImage, | ||
12 | wait | ||
13 | } from '@shared/server-commands' | ||
14 | import { Video, VideoPrivacy } from '@shared/models' | 7 | import { Video, VideoPrivacy } from '@shared/models' |
15 | import { completeVideoCheck } from '@server/tests/shared/video' | 8 | import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' |
16 | 9 | ||
17 | const expect = chai.expect | 10 | const expect = chai.expect |
18 | 11 | ||
diff --git a/server/tests/api/videos/video-captions.ts b/server/tests/api/videos/video-captions.ts index 9f00312aa..b7f26c35f 100644 --- a/server/tests/api/videos/video-captions.ts +++ b/server/tests/api/videos/video-captions.ts | |||
@@ -2,15 +2,14 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { checkVideoFilesWereRemoved, testCaptionFile } from '@server/tests/shared' | ||
6 | import { wait } from '@shared/core-utils' | ||
5 | import { | 7 | import { |
6 | checkVideoFilesWereRemoved, | ||
7 | cleanupTests, | 8 | cleanupTests, |
8 | createMultipleServers, | 9 | createMultipleServers, |
9 | doubleFollow, | 10 | doubleFollow, |
10 | PeerTubeServer, | 11 | PeerTubeServer, |
11 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
12 | testCaptionFile, | ||
13 | wait, | ||
14 | waitJobs | 13 | waitJobs |
15 | } from '@shared/server-commands' | 14 | } from '@shared/server-commands' |
16 | 15 | ||
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts index 2ac577a59..d435f3682 100644 --- a/server/tests/api/videos/video-channels.ts +++ b/server/tests/api/videos/video-channels.ts | |||
@@ -4,6 +4,9 @@ import 'mocha' | |||
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { basename } from 'path' | 5 | import { basename } from 'path' |
6 | import { ACTOR_IMAGES_SIZE } from '@server/initializers/constants' | 6 | import { ACTOR_IMAGES_SIZE } from '@server/initializers/constants' |
7 | import { testFileExistsOrNot, testImage } from '@server/tests/shared' | ||
8 | import { wait } from '@shared/core-utils' | ||
9 | import { User, VideoChannel } from '@shared/models' | ||
7 | import { | 10 | import { |
8 | cleanupTests, | 11 | cleanupTests, |
9 | createMultipleServers, | 12 | createMultipleServers, |
@@ -11,12 +14,8 @@ import { | |||
11 | PeerTubeServer, | 14 | PeerTubeServer, |
12 | setAccessTokensToServers, | 15 | setAccessTokensToServers, |
13 | setDefaultVideoChannel, | 16 | setDefaultVideoChannel, |
14 | testFileExistsOrNot, | ||
15 | testImage, | ||
16 | wait, | ||
17 | waitJobs | 17 | waitJobs |
18 | } from '@shared/server-commands' | 18 | } from '@shared/server-commands' |
19 | import { User, VideoChannel } from '@shared/models' | ||
20 | 19 | ||
21 | const expect = chai.expect | 20 | const expect = chai.expect |
22 | 21 | ||
diff --git a/server/tests/api/videos/video-comments.ts b/server/tests/api/videos/video-comments.ts index bb4f92a9b..2ae523970 100644 --- a/server/tests/api/videos/video-comments.ts +++ b/server/tests/api/videos/video-comments.ts | |||
@@ -2,15 +2,8 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { | 5 | import { dateIsValid, testImage } from '@server/tests/shared' |
6 | cleanupTests, | 6 | import { cleanupTests, CommentsCommand, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' |
7 | CommentsCommand, | ||
8 | createSingleServer, | ||
9 | dateIsValid, | ||
10 | PeerTubeServer, | ||
11 | setAccessTokensToServers, | ||
12 | testImage | ||
13 | } from '@shared/server-commands' | ||
14 | 7 | ||
15 | const expect = chai.expect | 8 | const expect = chai.expect |
16 | 9 | ||
diff --git a/server/tests/api/videos/video-create-transcoding.ts b/server/tests/api/videos/video-create-transcoding.ts index e81f54714..62a6bab0d 100644 --- a/server/tests/api/videos/video-create-transcoding.ts +++ b/server/tests/api/videos/video-create-transcoding.ts | |||
@@ -2,20 +2,20 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { expectStartWith } from '@server/tests/shared' | ||
6 | import { areObjectStorageTestsDisabled } from '@shared/core-utils' | ||
7 | import { HttpStatusCode, VideoDetails } from '@shared/models' | ||
5 | import { | 8 | import { |
6 | areObjectStorageTestsDisabled, | ||
7 | cleanupTests, | 9 | cleanupTests, |
8 | createMultipleServers, | 10 | createMultipleServers, |
9 | doubleFollow, | 11 | doubleFollow, |
10 | expectNoFailedTranscodingJob, | 12 | expectNoFailedTranscodingJob, |
11 | expectStartWith, | ||
12 | makeRawRequest, | 13 | makeRawRequest, |
13 | ObjectStorageCommand, | 14 | ObjectStorageCommand, |
14 | PeerTubeServer, | 15 | PeerTubeServer, |
15 | setAccessTokensToServers, | 16 | setAccessTokensToServers, |
16 | waitJobs | 17 | waitJobs |
17 | } from '@shared/server-commands' | 18 | } from '@shared/server-commands' |
18 | import { HttpStatusCode, VideoDetails } from '@shared/models' | ||
19 | 19 | ||
20 | const expect = chai.expect | 20 | const expect = chai.expect |
21 | 21 | ||
diff --git a/server/tests/api/videos/video-description.ts b/server/tests/api/videos/video-description.ts index 23c55f728..20b20488f 100644 --- a/server/tests/api/videos/video-description.ts +++ b/server/tests/api/videos/video-description.ts | |||
@@ -2,7 +2,14 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' | 5 | import { |
6 | cleanupTests, | ||
7 | createMultipleServers, | ||
8 | doubleFollow, | ||
9 | PeerTubeServer, | ||
10 | setAccessTokensToServers, | ||
11 | waitJobs | ||
12 | } from '@shared/server-commands' | ||
6 | 13 | ||
7 | const expect = chai.expect | 14 | const expect = chai.expect |
8 | 15 | ||
diff --git a/server/tests/api/videos/video-files.ts b/server/tests/api/videos/video-files.ts index 0b5121740..b0ef4a2e9 100644 --- a/server/tests/api/videos/video-files.ts +++ b/server/tests/api/videos/video-files.ts | |||
@@ -2,7 +2,14 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { expect } from 'chai' | 4 | import { expect } from 'chai' |
5 | import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' | 5 | import { |
6 | cleanupTests, | ||
7 | createMultipleServers, | ||
8 | doubleFollow, | ||
9 | PeerTubeServer, | ||
10 | setAccessTokensToServers, | ||
11 | waitJobs | ||
12 | } from '@shared/server-commands' | ||
6 | 13 | ||
7 | describe('Test videos files', function () { | 14 | describe('Test videos files', function () { |
8 | let servers: PeerTubeServer[] | 15 | let servers: PeerTubeServer[] |
diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts index d050a7a7e..218ec08ae 100644 --- a/server/tests/api/videos/video-hls.ts +++ b/server/tests/api/videos/video-hls.ts | |||
@@ -3,18 +3,20 @@ | |||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { basename, join } from 'path' | 5 | import { basename, join } from 'path' |
6 | import { removeFragmentedMP4Ext, uuidRegex } from '@shared/core-utils' | ||
7 | import { | 6 | import { |
8 | areObjectStorageTestsDisabled, | ||
9 | checkDirectoryIsEmpty, | 7 | checkDirectoryIsEmpty, |
10 | checkResolutionsInMasterPlaylist, | 8 | checkResolutionsInMasterPlaylist, |
11 | checkSegmentHash, | 9 | checkSegmentHash, |
12 | checkTmpIsEmpty, | 10 | checkTmpIsEmpty, |
11 | expectStartWith, | ||
12 | hlsInfohashExist | ||
13 | } from '@server/tests/shared' | ||
14 | import { areObjectStorageTestsDisabled, removeFragmentedMP4Ext, uuidRegex } from '@shared/core-utils' | ||
15 | import { HttpStatusCode, VideoStreamingPlaylistType } from '@shared/models' | ||
16 | import { | ||
13 | cleanupTests, | 17 | cleanupTests, |
14 | createMultipleServers, | 18 | createMultipleServers, |
15 | doubleFollow, | 19 | doubleFollow, |
16 | expectStartWith, | ||
17 | hlsInfohashExist, | ||
18 | makeRawRequest, | 20 | makeRawRequest, |
19 | ObjectStorageCommand, | 21 | ObjectStorageCommand, |
20 | PeerTubeServer, | 22 | PeerTubeServer, |
@@ -22,7 +24,6 @@ import { | |||
22 | waitJobs, | 24 | waitJobs, |
23 | webtorrentAdd | 25 | webtorrentAdd |
24 | } from '@shared/server-commands' | 26 | } from '@shared/server-commands' |
25 | import { HttpStatusCode, VideoStreamingPlaylistType } from '@shared/models' | ||
26 | import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants' | 27 | import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants' |
27 | 28 | ||
28 | const expect = chai.expect | 29 | const expect = chai.expect |
diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts index 2518743f7..e8e0f01f1 100644 --- a/server/tests/api/videos/video-imports.ts +++ b/server/tests/api/videos/video-imports.ts | |||
@@ -4,21 +4,19 @@ import 'mocha' | |||
4 | import { expect } from 'chai' | 4 | import { expect } from 'chai' |
5 | import { pathExists, readdir, remove } from 'fs-extra' | 5 | import { pathExists, readdir, remove } from 'fs-extra' |
6 | import { join } from 'path' | 6 | import { join } from 'path' |
7 | import { FIXTURE_URLS, testCaptionFile, testImage } from '@server/tests/shared' | ||
8 | import { areHttpImportTestsDisabled } from '@shared/core-utils' | ||
9 | import { VideoPrivacy, VideoResolution } from '@shared/models' | ||
7 | import { | 10 | import { |
8 | areHttpImportTestsDisabled, | ||
9 | cleanupTests, | 11 | cleanupTests, |
10 | createMultipleServers, | 12 | createMultipleServers, |
11 | createSingleServer, | 13 | createSingleServer, |
12 | doubleFollow, | 14 | doubleFollow, |
13 | FIXTURE_URLS, | ||
14 | PeerTubeServer, | 15 | PeerTubeServer, |
15 | setAccessTokensToServers, | 16 | setAccessTokensToServers, |
16 | setDefaultVideoChannel, | 17 | setDefaultVideoChannel, |
17 | testCaptionFile, | ||
18 | testImage, | ||
19 | waitJobs | 18 | waitJobs |
20 | } from '@shared/server-commands' | 19 | } from '@shared/server-commands' |
21 | import { VideoPrivacy, VideoResolution } from '@shared/models' | ||
22 | 20 | ||
23 | async function checkVideosServer1 (server: PeerTubeServer, idHttp: string, idMagnet: string, idTorrent: string) { | 21 | async function checkVideosServer1 (server: PeerTubeServer, idHttp: string, idMagnet: string, idTorrent: string) { |
24 | const videoHttp = await server.videos.get({ id: idHttp }) | 22 | const videoHttp = await server.videos.get({ id: idHttp }) |
diff --git a/server/tests/api/videos/video-playlist-thumbnails.ts b/server/tests/api/videos/video-playlist-thumbnails.ts index e6b6c34eb..5fdb0fc03 100644 --- a/server/tests/api/videos/video-playlist-thumbnails.ts +++ b/server/tests/api/videos/video-playlist-thumbnails.ts | |||
@@ -2,6 +2,8 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { testImage } from '@server/tests/shared' | ||
6 | import { VideoPlaylistPrivacy } from '@shared/models' | ||
5 | import { | 7 | import { |
6 | cleanupTests, | 8 | cleanupTests, |
7 | createMultipleServers, | 9 | createMultipleServers, |
@@ -9,10 +11,8 @@ import { | |||
9 | PeerTubeServer, | 11 | PeerTubeServer, |
10 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
11 | setDefaultVideoChannel, | 13 | setDefaultVideoChannel, |
12 | testImage, | ||
13 | waitJobs | 14 | waitJobs |
14 | } from '../../../../shared/server-commands' | 15 | } from '@shared/server-commands' |
15 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' | ||
16 | 16 | ||
17 | const expect = chai.expect | 17 | const expect = chai.expect |
18 | 18 | ||
diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts index 6279f5cd0..34327334f 100644 --- a/server/tests/api/videos/video-playlists.ts +++ b/server/tests/api/videos/video-playlists.ts | |||
@@ -2,8 +2,18 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { checkPlaylistFilesWereRemoved, testImage } from '@server/tests/shared' | ||
6 | import { wait } from '@shared/core-utils' | ||
7 | import { | ||
8 | HttpStatusCode, | ||
9 | VideoPlaylist, | ||
10 | VideoPlaylistCreateResult, | ||
11 | VideoPlaylistElementType, | ||
12 | VideoPlaylistPrivacy, | ||
13 | VideoPlaylistType, | ||
14 | VideoPrivacy | ||
15 | } from '@shared/models' | ||
5 | import { | 16 | import { |
6 | checkPlaylistFilesWereRemoved, | ||
7 | cleanupTests, | 17 | cleanupTests, |
8 | createMultipleServers, | 18 | createMultipleServers, |
9 | doubleFollow, | 19 | doubleFollow, |
@@ -11,19 +21,8 @@ import { | |||
11 | PlaylistsCommand, | 21 | PlaylistsCommand, |
12 | setAccessTokensToServers, | 22 | setAccessTokensToServers, |
13 | setDefaultVideoChannel, | 23 | setDefaultVideoChannel, |
14 | testImage, | ||
15 | wait, | ||
16 | waitJobs | 24 | waitJobs |
17 | } from '@shared/server-commands' | 25 | } from '@shared/server-commands' |
18 | import { | ||
19 | HttpStatusCode, | ||
20 | VideoPlaylist, | ||
21 | VideoPlaylistCreateResult, | ||
22 | VideoPlaylistElementType, | ||
23 | VideoPlaylistPrivacy, | ||
24 | VideoPlaylistType, | ||
25 | VideoPrivacy | ||
26 | } from '@shared/models' | ||
27 | 26 | ||
28 | const expect = chai.expect | 27 | const expect = chai.expect |
29 | 28 | ||
diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts index 13eb941ea..3051a443d 100644 --- a/server/tests/api/videos/video-privacy.ts +++ b/server/tests/api/videos/video-privacy.ts | |||
@@ -2,16 +2,9 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { | 5 | import { wait } from '@shared/core-utils' |
6 | cleanupTests, | ||
7 | createSingleServer, | ||
8 | doubleFollow, | ||
9 | PeerTubeServer, | ||
10 | setAccessTokensToServers, | ||
11 | wait, | ||
12 | waitJobs | ||
13 | } from '@shared/server-commands' | ||
14 | import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models' | 6 | import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models' |
7 | import { cleanupTests, createSingleServer, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' | ||
15 | 8 | ||
16 | const expect = chai.expect | 9 | const expect = chai.expect |
17 | 10 | ||
diff --git a/server/tests/api/videos/video-schedule-update.ts b/server/tests/api/videos/video-schedule-update.ts index 9408574ad..00b4f6cbc 100644 --- a/server/tests/api/videos/video-schedule-update.ts +++ b/server/tests/api/videos/video-schedule-update.ts | |||
@@ -2,16 +2,16 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { wait } from '@shared/core-utils' | ||
6 | import { VideoPrivacy } from '@shared/models' | ||
5 | import { | 7 | import { |
6 | cleanupTests, | 8 | cleanupTests, |
7 | createMultipleServers, | 9 | createMultipleServers, |
8 | doubleFollow, | 10 | doubleFollow, |
9 | PeerTubeServer, | 11 | PeerTubeServer, |
10 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
11 | wait, | ||
12 | waitJobs | 13 | waitJobs |
13 | } from '@shared/server-commands' | 14 | } from '@shared/server-commands' |
14 | import { VideoPrivacy } from '@shared/models' | ||
15 | 15 | ||
16 | const expect = chai.expect | 16 | const expect = chai.expect |
17 | 17 | ||
diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts index f4b0bc53a..d24a8f4e1 100644 --- a/server/tests/api/videos/video-transcoder.ts +++ b/server/tests/api/videos/video-transcoder.ts | |||
@@ -3,29 +3,21 @@ | |||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { omit } from 'lodash' | 5 | import { omit } from 'lodash' |
6 | import { getMaxBitrate, getMinLimitBitrate } from '@shared/core-utils' | 6 | import { canDoQuickTranscode } from '@server/helpers/ffprobe-utils' |
7 | import { generateHighBitrateVideo, generateVideoWithFramerate } from '@server/tests/shared' | ||
8 | import { buildAbsoluteFixturePath, getMaxBitrate, getMinLimitBitrate } from '@shared/core-utils' | ||
9 | import { getAudioStream, getMetadataFromFile, getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '@shared/extra-utils' | ||
10 | import { HttpStatusCode, VideoState } from '@shared/models' | ||
7 | import { | 11 | import { |
8 | buildAbsoluteFixturePath, | ||
9 | cleanupTests, | 12 | cleanupTests, |
10 | createMultipleServers, | 13 | createMultipleServers, |
11 | doubleFollow, | 14 | doubleFollow, |
12 | generateHighBitrateVideo, | ||
13 | generateVideoWithFramerate, | ||
14 | makeGetRequest, | 15 | makeGetRequest, |
15 | PeerTubeServer, | 16 | PeerTubeServer, |
16 | setAccessTokensToServers, | 17 | setAccessTokensToServers, |
17 | waitJobs, | 18 | waitJobs, |
18 | webtorrentAdd | 19 | webtorrentAdd |
19 | } from '@shared/server-commands' | 20 | } from '@shared/server-commands' |
20 | import { HttpStatusCode, VideoState } from '@shared/models' | ||
21 | import { | ||
22 | canDoQuickTranscode, | ||
23 | getAudioStream, | ||
24 | getMetadataFromFile, | ||
25 | getVideoFileBitrate, | ||
26 | getVideoFileFPS, | ||
27 | getVideoFileResolution | ||
28 | } from '../../../helpers/ffprobe-utils' | ||
29 | 21 | ||
30 | const expect = chai.expect | 22 | const expect = chai.expect |
31 | 23 | ||
diff --git a/server/tests/api/videos/videos-history.ts b/server/tests/api/videos/videos-history.ts index 813fc4f45..4e5ba13aa 100644 --- a/server/tests/api/videos/videos-history.ts +++ b/server/tests/api/videos/videos-history.ts | |||
@@ -2,16 +2,16 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { wait } from '@shared/core-utils' | ||
6 | import { HttpStatusCode, Video } from '@shared/models' | ||
5 | import { | 7 | import { |
6 | cleanupTests, | 8 | cleanupTests, |
7 | createSingleServer, | 9 | createSingleServer, |
8 | HistoryCommand, | 10 | HistoryCommand, |
9 | killallServers, | 11 | killallServers, |
10 | PeerTubeServer, | 12 | PeerTubeServer, |
11 | setAccessTokensToServers, | 13 | setAccessTokensToServers |
12 | wait | ||
13 | } from '@shared/server-commands' | 14 | } from '@shared/server-commands' |
14 | import { HttpStatusCode, Video } from '@shared/models' | ||
15 | 15 | ||
16 | const expect = chai.expect | 16 | const expect = chai.expect |
17 | 17 | ||
diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts index 08a4efb63..61fc0cb20 100644 --- a/server/tests/api/videos/videos-overview.ts +++ b/server/tests/api/videos/videos-overview.ts | |||
@@ -2,8 +2,9 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, wait } from '@shared/server-commands' | 5 | import { wait } from '@shared/core-utils' |
6 | import { VideosOverview } from '@shared/models' | 6 | import { VideosOverview } from '@shared/models' |
7 | import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' | ||
7 | 8 | ||
8 | const expect = chai.expect | 9 | const expect = chai.expect |
9 | 10 | ||
diff --git a/server/tests/api/videos/videos-views-cleaner.ts b/server/tests/api/videos/videos-views-cleaner.ts index 7f7597af4..e6815a4a8 100644 --- a/server/tests/api/videos/videos-views-cleaner.ts +++ b/server/tests/api/videos/videos-views-cleaner.ts | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { wait } from '@shared/core-utils' | ||
5 | import { | 6 | import { |
6 | cleanupTests, | 7 | cleanupTests, |
7 | createMultipleServers, | 8 | createMultipleServers, |
@@ -9,9 +10,8 @@ import { | |||
9 | killallServers, | 10 | killallServers, |
10 | PeerTubeServer, | 11 | PeerTubeServer, |
11 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
12 | wait, | ||
13 | waitJobs | 13 | waitJobs |
14 | } from '../../../../shared/server-commands' | 14 | } from '@shared/server-commands' |
15 | 15 | ||
16 | const expect = chai.expect | 16 | const expect = chai.expect |
17 | 17 | ||