aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-09-13 12:00:13 +0200
committerChocobozzz <me@florianbigard.com>2022-09-13 12:00:13 +0200
commit367a9dc69975a0db01962dbb7106635fb8eb1696 (patch)
treeedcae09eb37dc50012c66c229a7e0d3fa23a2084 /server/tests
parent9f244885f0974730c488233827b63ff0ff08319e (diff)
downloadPeerTube-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.ts4
-rw-r--r--server/tests/api/transcoding/transcoder.ts4
-rw-r--r--server/tests/api/transcoding/video-studio.ts4
-rw-r--r--server/tests/cli/update-host.ts2
-rw-r--r--server/tests/shared/videos.ts13
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 @@
3import { expect } from 'chai' 3import { expect } from 'chai'
4import { basename, join } from 'path' 4import { basename, join } from 'path'
5import { ffprobePromise, getVideoStream } from '@server/helpers/ffmpeg' 5import { ffprobePromise, getVideoStream } from '@server/helpers/ffmpeg'
6import { checkLiveSegmentHash, checkResolutionsInMasterPlaylist, getAllFiles, testImage } from '@server/tests/shared' 6import { checkLiveSegmentHash, checkResolutionsInMasterPlaylist, testImage } from '@server/tests/shared'
7import { wait } from '@shared/core-utils' 7import { getAllFiles, wait } from '@shared/core-utils'
8import { 8import {
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
3import { expect } from 'chai' 3import { expect } from 'chai'
4import { canDoQuickTranscode } from '@server/helpers/ffmpeg' 4import { canDoQuickTranscode } from '@server/helpers/ffmpeg'
5import { generateHighBitrateVideo, generateVideoWithFramerate, getAllFiles } from '@server/tests/shared' 5import { generateHighBitrateVideo, generateVideoWithFramerate } from '@server/tests/shared'
6import { buildAbsoluteFixturePath, getMaxBitrate, getMinLimitBitrate, omit } from '@shared/core-utils' 6import { buildAbsoluteFixturePath, getAllFiles, getMaxBitrate, getMinLimitBitrate, omit } from '@shared/core-utils'
7import { 7import {
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 @@
1import { expect } from 'chai' 1import { expect } from 'chai'
2import { expectStartWith, getAllFiles } from '@server/tests/shared' 2import { expectStartWith } from '@server/tests/shared'
3import { areObjectStorageTestsDisabled } from '@shared/core-utils' 3import { areObjectStorageTestsDisabled, getAllFiles } from '@shared/core-utils'
4import { VideoStudioTask } from '@shared/models' 4import { VideoStudioTask } from '@shared/models'
5import { 5import {
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
3import { expect } from 'chai' 3import { expect } from 'chai'
4import { getAllFiles } from '@shared/core-utils'
4import { 5import {
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'
14import { getAllFiles } from '../shared'
15 15
16describe('Test update host scripts', function () { 16describe('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
244function 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
256export { 246export {
@@ -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}