diff options
author | Chocobozzz <me@florianbigard.com> | 2022-09-13 12:00:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-09-13 12:00:13 +0200 |
commit | 367a9dc69975a0db01962dbb7106635fb8eb1696 (patch) | |
tree | edcae09eb37dc50012c66c229a7e0d3fa23a2084 /server/tests | |
parent | 9f244885f0974730c488233827b63ff0ff08319e (diff) | |
download | PeerTube-367a9dc69975a0db01962dbb7106635fb8eb1696.tar.gz PeerTube-367a9dc69975a0db01962dbb7106635fb8eb1696.tar.zst PeerTube-367a9dc69975a0db01962dbb7106635fb8eb1696.zip |
Don't display remove file icon in some cases
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/live/live.ts | 4 | ||||
-rw-r--r-- | server/tests/api/transcoding/transcoder.ts | 4 | ||||
-rw-r--r-- | server/tests/api/transcoding/video-studio.ts | 4 | ||||
-rw-r--r-- | server/tests/cli/update-host.ts | 2 | ||||
-rw-r--r-- | server/tests/shared/videos.ts | 13 |
5 files changed, 8 insertions, 19 deletions
diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts index 48982f4de..885751285 100644 --- a/server/tests/api/live/live.ts +++ b/server/tests/api/live/live.ts | |||
@@ -3,8 +3,8 @@ | |||
3 | import { expect } from 'chai' | 3 | import { expect } from 'chai' |
4 | import { basename, join } from 'path' | 4 | import { basename, join } from 'path' |
5 | import { ffprobePromise, getVideoStream } from '@server/helpers/ffmpeg' | 5 | import { ffprobePromise, getVideoStream } from '@server/helpers/ffmpeg' |
6 | import { checkLiveSegmentHash, checkResolutionsInMasterPlaylist, getAllFiles, testImage } from '@server/tests/shared' | 6 | import { checkLiveSegmentHash, checkResolutionsInMasterPlaylist, testImage } from '@server/tests/shared' |
7 | import { wait } from '@shared/core-utils' | 7 | import { getAllFiles, wait } from '@shared/core-utils' |
8 | import { | 8 | import { |
9 | HttpStatusCode, | 9 | HttpStatusCode, |
10 | LiveVideo, | 10 | LiveVideo, |
diff --git a/server/tests/api/transcoding/transcoder.ts b/server/tests/api/transcoding/transcoder.ts index db0127805..c591f5f6f 100644 --- a/server/tests/api/transcoding/transcoder.ts +++ b/server/tests/api/transcoding/transcoder.ts | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | import { expect } from 'chai' | 3 | import { expect } from 'chai' |
4 | import { canDoQuickTranscode } from '@server/helpers/ffmpeg' | 4 | import { canDoQuickTranscode } from '@server/helpers/ffmpeg' |
5 | import { generateHighBitrateVideo, generateVideoWithFramerate, getAllFiles } from '@server/tests/shared' | 5 | import { generateHighBitrateVideo, generateVideoWithFramerate } from '@server/tests/shared' |
6 | import { buildAbsoluteFixturePath, getMaxBitrate, getMinLimitBitrate, omit } from '@shared/core-utils' | 6 | import { buildAbsoluteFixturePath, getAllFiles, getMaxBitrate, getMinLimitBitrate, omit } from '@shared/core-utils' |
7 | import { | 7 | import { |
8 | buildFileMetadata, | 8 | buildFileMetadata, |
9 | getAudioStream, | 9 | getAudioStream, |
diff --git a/server/tests/api/transcoding/video-studio.ts b/server/tests/api/transcoding/video-studio.ts index ac1c0fc7e..9613111b5 100644 --- a/server/tests/api/transcoding/video-studio.ts +++ b/server/tests/api/transcoding/video-studio.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { expect } from 'chai' | 1 | import { expect } from 'chai' |
2 | import { expectStartWith, getAllFiles } from '@server/tests/shared' | 2 | import { expectStartWith } from '@server/tests/shared' |
3 | import { areObjectStorageTestsDisabled } from '@shared/core-utils' | 3 | import { areObjectStorageTestsDisabled, getAllFiles } from '@shared/core-utils' |
4 | import { VideoStudioTask } from '@shared/models' | 4 | import { VideoStudioTask } from '@shared/models' |
5 | import { | 5 | import { |
6 | cleanupTests, | 6 | cleanupTests, |
diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts index 53c4e7824..97632450a 100644 --- a/server/tests/cli/update-host.ts +++ b/server/tests/cli/update-host.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import { expect } from 'chai' | 3 | import { expect } from 'chai' |
4 | import { getAllFiles } from '@shared/core-utils' | ||
4 | import { | 5 | import { |
5 | cleanupTests, | 6 | cleanupTests, |
6 | createSingleServer, | 7 | createSingleServer, |
@@ -11,7 +12,6 @@ import { | |||
11 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
12 | waitJobs | 13 | waitJobs |
13 | } from '@shared/server-commands' | 14 | } from '@shared/server-commands' |
14 | import { getAllFiles } from '../shared' | ||
15 | 15 | ||
16 | describe('Test update host scripts', function () { | 16 | describe('Test update host scripts', function () { |
17 | let server: PeerTubeServer | 17 | let server: PeerTubeServer |
diff --git a/server/tests/shared/videos.ts b/server/tests/shared/videos.ts index 3ab245392..e18329e07 100644 --- a/server/tests/shared/videos.ts +++ b/server/tests/shared/videos.ts | |||
@@ -241,16 +241,6 @@ async function uploadRandomVideoOnServers ( | |||
241 | return res | 241 | return res |
242 | } | 242 | } |
243 | 243 | ||
244 | function getAllFiles (video: VideoDetails) { | ||
245 | const files = video.files | ||
246 | |||
247 | if (video.streamingPlaylists[0]) { | ||
248 | return files.concat(video.streamingPlaylists[0].files) | ||
249 | } | ||
250 | |||
251 | return files | ||
252 | } | ||
253 | |||
254 | // --------------------------------------------------------------------------- | 244 | // --------------------------------------------------------------------------- |
255 | 245 | ||
256 | export { | 246 | export { |
@@ -258,6 +248,5 @@ export { | |||
258 | checkUploadVideoParam, | 248 | checkUploadVideoParam, |
259 | uploadRandomVideoOnServers, | 249 | uploadRandomVideoOnServers, |
260 | checkVideoFilesWereRemoved, | 250 | checkVideoFilesWereRemoved, |
261 | saveVideoInServers, | 251 | saveVideoInServers |
262 | getAllFiles | ||
263 | } | 252 | } |