import { VideoPrivacy } from '../../../../shared/models/videos'
import {
checkVideoFilesWereRemoved,
+ cleanupTests,
completeVideoCheck,
- flushTests,
+ flushAndRunServer,
getVideo,
getVideoCategories,
getVideoLanguages,
getVideosListPagination,
getVideosListSort,
getVideosWithFilters,
- killallServers,
rateVideo,
removeVideo,
- runServer,
ServerInfo,
setAccessTokensToServers,
testImage,
uploadVideo,
viewVideo,
wait
-} from '../../utils'
+} from '../../../../shared/extra-utils'
const expect = chai.expect
tags: [ 'tag1', 'tag2', 'tag3' ],
privacy: VideoPrivacy.PUBLIC,
commentsEnabled: true,
+ downloadEnabled: true,
channel: {
displayName: 'Main root channel',
name: 'root_channel',
privacy: VideoPrivacy.PUBLIC,
duration: 5,
commentsEnabled: false,
+ downloadEnabled: false,
channel: {
name: 'root_channel',
displayName: 'Main root channel',
before(async function () {
this.timeout(30000)
- await flushTests()
-
- server = await runServer(1)
+ server = await flushAndRunServer(1)
await setAccessTokensToServers([ server ])
})
nsfw: false,
description: 'my super description updated',
commentsEnabled: false,
+ downloadEnabled: false,
tags: [ 'tagup1', 'tagup2' ]
}
await updateVideo(server.url, server.accessToken, videoId, attributes)
})
after(async function () {
- killallServers([ server ])
-
- // Keep the logs if the test failed
- if (this['ok']) {
- await flushTests()
- }
+ await cleanupTests([ server ])
})
})