diff options
Diffstat (limited to 'server/tests/api/videos/single-server.ts')
-rw-r--r-- | server/tests/api/videos/single-server.ts | 17 |
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 @@ | |||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import { keyBy } from 'lodash' | 4 | import { keyBy } from 'lodash' |
5 | import 'mocha' | 5 | import 'mocha' |
6 | import { join } from 'path' | ||
7 | import { VideoPrivacy } from '../../../../shared/models/videos' | 6 | import { VideoPrivacy } from '../../../../shared/models/videos' |
8 | import { readdirPromise } from '../../../helpers/core-utils' | ||
9 | import { | 7 | import { |
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 | ||
15 | const expect = chai.expect | 14 | const 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 | } |