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/live | |
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/live')
-rw-r--r-- | server/tests/api/live/live-constraints.ts | 6 | ||||
-rw-r--r-- | server/tests/api/live/live-permanent.ts | 4 | ||||
-rw-r--r-- | server/tests/api/live/live-rtmps.ts | 4 | ||||
-rw-r--r-- | server/tests/api/live/live-save-replay.ts | 6 | ||||
-rw-r--r-- | server/tests/api/live/live-socket-messages.ts | 4 | ||||
-rw-r--r-- | server/tests/api/live/live-views.ts | 4 | ||||
-rw-r--r-- | server/tests/api/live/live.ts | 25 |
7 files changed, 25 insertions, 28 deletions
diff --git a/server/tests/api/live/live-constraints.ts b/server/tests/api/live/live-constraints.ts index 89880c46b..909399836 100644 --- a/server/tests/api/live/live-constraints.ts +++ b/server/tests/api/live/live-constraints.ts | |||
@@ -2,9 +2,9 @@ | |||
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 { VideoPrivacy } from '@shared/models' | 6 | import { VideoPrivacy } from '@shared/models' |
6 | import { | 7 | import { |
7 | checkLiveCleanupAfterSave, | ||
8 | cleanupTests, | 8 | cleanupTests, |
9 | ConfigCommand, | 9 | ConfigCommand, |
10 | createMultipleServers, | 10 | createMultipleServers, |
@@ -12,9 +12,9 @@ import { | |||
12 | PeerTubeServer, | 12 | PeerTubeServer, |
13 | setAccessTokensToServers, | 13 | setAccessTokensToServers, |
14 | setDefaultVideoChannel, | 14 | setDefaultVideoChannel, |
15 | wait, | ||
16 | waitJobs | 15 | waitJobs |
17 | } from '../../../../shared/server-commands' | 16 | } from '@shared/server-commands' |
17 | import { checkLiveCleanupAfterSave } from '../../shared' | ||
18 | 18 | ||
19 | const expect = chai.expect | 19 | const expect = chai.expect |
20 | 20 | ||
diff --git a/server/tests/api/live/live-permanent.ts b/server/tests/api/live/live-permanent.ts index 12a4d64d8..c2392603b 100644 --- a/server/tests/api/live/live-permanent.ts +++ b/server/tests/api/live/live-permanent.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 { LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models' | 6 | import { LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models' |
6 | import { | 7 | import { |
7 | cleanupTests, | 8 | cleanupTests, |
@@ -12,9 +13,8 @@ import { | |||
12 | setAccessTokensToServers, | 13 | setAccessTokensToServers, |
13 | setDefaultVideoChannel, | 14 | setDefaultVideoChannel, |
14 | stopFfmpeg, | 15 | stopFfmpeg, |
15 | wait, | ||
16 | waitJobs | 16 | waitJobs |
17 | } from '../../../../shared/server-commands' | 17 | } from '@shared/server-commands' |
18 | 18 | ||
19 | const expect = chai.expect | 19 | const expect = chai.expect |
20 | 20 | ||
diff --git a/server/tests/api/live/live-rtmps.ts b/server/tests/api/live/live-rtmps.ts index 31e8f906e..935061971 100644 --- a/server/tests/api/live/live-rtmps.ts +++ b/server/tests/api/live/live-rtmps.ts | |||
@@ -2,9 +2,9 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { buildAbsoluteFixturePath } from '@shared/core-utils' | ||
5 | import { VideoPrivacy } from '@shared/models' | 6 | import { VideoPrivacy } from '@shared/models' |
6 | import { | 7 | import { |
7 | buildAbsoluteFixturePath, | ||
8 | cleanupTests, | 8 | cleanupTests, |
9 | createSingleServer, | 9 | createSingleServer, |
10 | PeerTubeServer, | 10 | PeerTubeServer, |
@@ -14,7 +14,7 @@ import { | |||
14 | stopFfmpeg, | 14 | stopFfmpeg, |
15 | testFfmpegStreamError, | 15 | testFfmpegStreamError, |
16 | waitUntilLivePublishedOnAllServers | 16 | waitUntilLivePublishedOnAllServers |
17 | } from '../../../../shared/server-commands' | 17 | } from '@shared/server-commands' |
18 | 18 | ||
19 | const expect = chai.expect | 19 | const expect = chai.expect |
20 | 20 | ||
diff --git a/server/tests/api/live/live-save-replay.ts b/server/tests/api/live/live-save-replay.ts index 9fb6b4e54..95a342b01 100644 --- a/server/tests/api/live/live-save-replay.ts +++ b/server/tests/api/live/live-save-replay.ts | |||
@@ -3,8 +3,10 @@ | |||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { FfmpegCommand } from 'fluent-ffmpeg' | 5 | import { FfmpegCommand } from 'fluent-ffmpeg' |
6 | import { checkLiveCleanupAfterSave } from '@server/tests/shared' | ||
7 | import { wait } from '@shared/core-utils' | ||
8 | import { HttpStatusCode, LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models' | ||
6 | import { | 9 | import { |
7 | checkLiveCleanupAfterSave, | ||
8 | cleanupTests, | 10 | cleanupTests, |
9 | ConfigCommand, | 11 | ConfigCommand, |
10 | createMultipleServers, | 12 | createMultipleServers, |
@@ -14,12 +16,10 @@ import { | |||
14 | setDefaultVideoChannel, | 16 | setDefaultVideoChannel, |
15 | stopFfmpeg, | 17 | stopFfmpeg, |
16 | testFfmpegStreamError, | 18 | testFfmpegStreamError, |
17 | wait, | ||
18 | waitJobs, | 19 | waitJobs, |
19 | waitUntilLivePublishedOnAllServers, | 20 | waitUntilLivePublishedOnAllServers, |
20 | waitUntilLiveSavedOnAllServers | 21 | waitUntilLiveSavedOnAllServers |
21 | } from '@shared/server-commands' | 22 | } from '@shared/server-commands' |
22 | import { HttpStatusCode, LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models' | ||
23 | 23 | ||
24 | const expect = chai.expect | 24 | const expect = chai.expect |
25 | 25 | ||
diff --git a/server/tests/api/live/live-socket-messages.ts b/server/tests/api/live/live-socket-messages.ts index 42cf9c5f6..50b16443e 100644 --- a/server/tests/api/live/live-socket-messages.ts +++ b/server/tests/api/live/live-socket-messages.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 { VideoPrivacy, VideoState } from '@shared/models' | 6 | import { VideoPrivacy, VideoState } from '@shared/models' |
6 | import { | 7 | import { |
7 | cleanupTests, | 8 | cleanupTests, |
@@ -11,10 +12,9 @@ import { | |||
11 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
12 | setDefaultVideoChannel, | 13 | setDefaultVideoChannel, |
13 | stopFfmpeg, | 14 | stopFfmpeg, |
14 | wait, | ||
15 | waitJobs, | 15 | waitJobs, |
16 | waitUntilLivePublishedOnAllServers | 16 | waitUntilLivePublishedOnAllServers |
17 | } from '../../../../shared/server-commands' | 17 | } from '@shared/server-commands' |
18 | 18 | ||
19 | const expect = chai.expect | 19 | const expect = chai.expect |
20 | 20 | ||
diff --git a/server/tests/api/live/live-views.ts b/server/tests/api/live/live-views.ts index 5de4436be..446d0913c 100644 --- a/server/tests/api/live/live-views.ts +++ b/server/tests/api/live/live-views.ts | |||
@@ -3,6 +3,7 @@ | |||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { FfmpegCommand } from 'fluent-ffmpeg' | 5 | import { FfmpegCommand } from 'fluent-ffmpeg' |
6 | import { wait } from '@shared/core-utils' | ||
6 | import { VideoPrivacy } from '@shared/models' | 7 | import { VideoPrivacy } from '@shared/models' |
7 | import { | 8 | import { |
8 | cleanupTests, | 9 | cleanupTests, |
@@ -12,10 +13,9 @@ import { | |||
12 | setAccessTokensToServers, | 13 | setAccessTokensToServers, |
13 | setDefaultVideoChannel, | 14 | setDefaultVideoChannel, |
14 | stopFfmpeg, | 15 | stopFfmpeg, |
15 | wait, | ||
16 | waitJobs, | 16 | waitJobs, |
17 | waitUntilLivePublishedOnAllServers | 17 | waitUntilLivePublishedOnAllServers |
18 | } from '../../../../shared/server-commands' | 18 | } from '@shared/server-commands' |
19 | 19 | ||
20 | const expect = chai.expect | 20 | const expect = chai.expect |
21 | 21 | ||
diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts index 3869fd6c7..3f9355d2d 100644 --- a/server/tests/api/live/live.ts +++ b/server/tests/api/live/live.ts | |||
@@ -4,10 +4,18 @@ 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 { ffprobePromise, getVideoStreamFromFile } from '@server/helpers/ffprobe-utils' | 6 | import { ffprobePromise, getVideoStreamFromFile } from '@server/helpers/ffprobe-utils' |
7 | import { checkLiveCleanupAfterSave, checkLiveSegmentHash, checkResolutionsInMasterPlaylist, testImage } from '@server/tests/shared' | ||
8 | import { wait } from '@shared/core-utils' | ||
9 | import { | ||
10 | HttpStatusCode, | ||
11 | LiveVideo, | ||
12 | LiveVideoCreate, | ||
13 | VideoDetails, | ||
14 | VideoPrivacy, | ||
15 | VideoState, | ||
16 | VideoStreamingPlaylistType | ||
17 | } from '@shared/models' | ||
7 | import { | 18 | import { |
8 | checkLiveCleanupAfterSave, | ||
9 | checkLiveSegmentHash, | ||
10 | checkResolutionsInMasterPlaylist, | ||
11 | cleanupTests, | 19 | cleanupTests, |
12 | createMultipleServers, | 20 | createMultipleServers, |
13 | doubleFollow, | 21 | doubleFollow, |
@@ -20,20 +28,9 @@ import { | |||
20 | setDefaultVideoChannel, | 28 | setDefaultVideoChannel, |
21 | stopFfmpeg, | 29 | stopFfmpeg, |
22 | testFfmpegStreamError, | 30 | testFfmpegStreamError, |
23 | testImage, | ||
24 | wait, | ||
25 | waitJobs, | 31 | waitJobs, |
26 | waitUntilLivePublishedOnAllServers | 32 | waitUntilLivePublishedOnAllServers |
27 | } from '@shared/server-commands' | 33 | } from '@shared/server-commands' |
28 | import { | ||
29 | HttpStatusCode, | ||
30 | LiveVideo, | ||
31 | LiveVideoCreate, | ||
32 | VideoDetails, | ||
33 | VideoPrivacy, | ||
34 | VideoState, | ||
35 | VideoStreamingPlaylistType | ||
36 | } from '@shared/models' | ||
37 | 34 | ||
38 | const expect = chai.expect | 35 | const expect = chai.expect |
39 | 36 | ||