From 367a9dc69975a0db01962dbb7106635fb8eb1696 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 13 Sep 2022 12:00:13 +0200 Subject: Don't display remove file icon in some cases --- server/tests/api/live/live.ts | 4 ++-- server/tests/api/transcoding/transcoder.ts | 4 ++-- server/tests/api/transcoding/video-studio.ts | 4 ++-- server/tests/cli/update-host.ts | 2 +- server/tests/shared/videos.ts | 13 +------------ 5 files changed, 8 insertions(+), 19 deletions(-) (limited to 'server') 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 @@ import { expect } from 'chai' import { basename, join } from 'path' import { ffprobePromise, getVideoStream } from '@server/helpers/ffmpeg' -import { checkLiveSegmentHash, checkResolutionsInMasterPlaylist, getAllFiles, testImage } from '@server/tests/shared' -import { wait } from '@shared/core-utils' +import { checkLiveSegmentHash, checkResolutionsInMasterPlaylist, testImage } from '@server/tests/shared' +import { getAllFiles, wait } from '@shared/core-utils' import { HttpStatusCode, 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 @@ import { expect } from 'chai' import { canDoQuickTranscode } from '@server/helpers/ffmpeg' -import { generateHighBitrateVideo, generateVideoWithFramerate, getAllFiles } from '@server/tests/shared' -import { buildAbsoluteFixturePath, getMaxBitrate, getMinLimitBitrate, omit } from '@shared/core-utils' +import { generateHighBitrateVideo, generateVideoWithFramerate } from '@server/tests/shared' +import { buildAbsoluteFixturePath, getAllFiles, getMaxBitrate, getMinLimitBitrate, omit } from '@shared/core-utils' import { buildFileMetadata, 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 @@ import { expect } from 'chai' -import { expectStartWith, getAllFiles } from '@server/tests/shared' -import { areObjectStorageTestsDisabled } from '@shared/core-utils' +import { expectStartWith } from '@server/tests/shared' +import { areObjectStorageTestsDisabled, getAllFiles } from '@shared/core-utils' import { VideoStudioTask } from '@shared/models' import { 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 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ import { expect } from 'chai' +import { getAllFiles } from '@shared/core-utils' import { cleanupTests, createSingleServer, @@ -11,7 +12,6 @@ import { setAccessTokensToServers, waitJobs } from '@shared/server-commands' -import { getAllFiles } from '../shared' describe('Test update host scripts', function () { 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 ( return res } -function getAllFiles (video: VideoDetails) { - const files = video.files - - if (video.streamingPlaylists[0]) { - return files.concat(video.streamingPlaylists[0].files) - } - - return files -} - // --------------------------------------------------------------------------- export { @@ -258,6 +248,5 @@ export { checkUploadVideoParam, uploadRandomVideoOnServers, checkVideoFilesWereRemoved, - saveVideoInServers, - getAllFiles + saveVideoInServers } -- cgit v1.2.3