aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/single-server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/single-server.ts')
-rw-r--r--server/tests/api/videos/single-server.ts17
1 files changed, 6 insertions, 11 deletions
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts
index ca20f39a0..76d265ec5 100644
--- a/server/tests/api/videos/single-server.ts
+++ b/server/tests/api/videos/single-server.ts
@@ -3,13 +3,12 @@
3import * as chai from 'chai' 3import * as chai from 'chai'
4import { keyBy } from 'lodash' 4import { keyBy } from 'lodash'
5import 'mocha' 5import 'mocha'
6import { join } from 'path'
7import { VideoPrivacy } from '../../../../shared/models/videos' 6import { VideoPrivacy } from '../../../../shared/models/videos'
8import { readdirPromise } from '../../../helpers/core-utils'
9import { 7import {
10 completeVideoCheck, flushTests, getVideo, getVideoCategories, getVideoLanguages, getVideoLicences, getVideoPrivacies, 8 checkVideoFilesWereRemoved, completeVideoCheck, flushTests, getVideo, getVideoCategories, getVideoLanguages, getVideoLicences,
11 getVideosList, getVideosListPagination, getVideosListSort, killallServers, rateVideo, removeVideo, runServer, searchVideo, 9 getVideoPrivacies, getVideosList, getVideosListPagination, getVideosListSort, killallServers, rateVideo, removeVideo, runServer,
12 searchVideoWithPagination, searchVideoWithSort, ServerInfo, setAccessTokensToServers, testVideoImage, updateVideo, uploadVideo, viewVideo 10 searchVideo, searchVideoWithPagination, searchVideoWithSort, ServerInfo, setAccessTokensToServers, testImage, updateVideo, uploadVideo,
11 viewVideo
13} from '../../utils' 12} from '../../utils'
14 13
15const expect = chai.expect 14const expect = chai.expect
@@ -277,11 +276,7 @@ describe('Test a single server', function () {
277 it('Should remove the video', async function () { 276 it('Should remove the video', async function () {
278 await removeVideo(server.url, server.accessToken, videoId) 277 await removeVideo(server.url, server.accessToken, videoId)
279 278
280 const files1 = await readdirPromise(join(__dirname, '..', '..', '..', '..', 'test1', 'videos')) 279 await checkVideoFilesWereRemoved(videoUUID, 1)
281 expect(files1).to.have.lengthOf(0)
282
283 const files2 = await readdirPromise(join(__dirname, '..', '..', '..', '..', 'test1', 'thumbnails'))
284 expect(files2).to.have.lengthOf(0)
285 }) 280 })
286 281
287 it('Should not have videos', async function () { 282 it('Should not have videos', async function () {
@@ -346,7 +341,7 @@ describe('Test a single server', function () {
346 341
347 for (const video of videos) { 342 for (const video of videos) {
348 const videoName = video.name.replace(' name', '') 343 const videoName = video.name.replace(' name', '')
349 const test = await testVideoImage(server.url, videoName, video.thumbnailPath) 344 const test = await testImage(server.url, videoName, video.thumbnailPath)
350 345
351 expect(test).to.equal(true) 346 expect(test).to.equal(true)
352 } 347 }