})
})
- describe('HLS only video edition', function () {
+ describe('HLS only studio edition', function () {
before(async function () {
// Disable webtorrent
})
})
- describe('Object storage video edition', function () {
+ describe('Server restart', function () {
+
+ it('Should still be able to run video edition after a server restart', async function () {
+ this.timeout(240_000)
+
+ await renewVideo()
+ await servers[0].videoStudio.createEditionTasks({ videoId: videoUUID, tasks: VideoStudioCommand.getComplexTask() })
+
+ await servers[0].kill()
+ await servers[0].run()
+
+ await waitJobs(servers)
+
+ for (const server of servers) {
+ await checkVideoDuration(server, videoUUID, 9)
+ }
+ })
+
+ it('Should have an empty persistent tmp directory', async function () {
+ await checkPersistentTmpIsEmpty(servers[0])
+ })
+ })
+
+ describe('Object storage studio edition', function () {
if (areMockObjectStorageTestsDisabled()) return
+ const objectStorage = new ObjectStorageCommand()
+
before(async function () {
- await ObjectStorageCommand.prepareDefaultMockBuckets()
+ await objectStorage.prepareDefaultMockBuckets()
await servers[0].kill()
- await servers[0].run(ObjectStorageCommand.getDefaultMockConfig())
+ await servers[0].run(objectStorage.getDefaultMockConfig())
await servers[0].config.enableMinimumTranscoding()
})
}
for (const webtorrentFile of video.files) {
- expectStartWith(webtorrentFile.fileUrl, ObjectStorageCommand.getMockWebTorrentBaseUrl())
+ expectStartWith(webtorrentFile.fileUrl, objectStorage.getMockWebVideosBaseUrl())
}
for (const hlsFile of video.streamingPlaylists[0].files) {
- expectStartWith(hlsFile.fileUrl, ObjectStorageCommand.getMockPlaylistBaseUrl())
+ expectStartWith(hlsFile.fileUrl, objectStorage.getMockPlaylistBaseUrl())
}
await checkVideoDuration(server, videoUUID, 9)
}
})
- })
-
- describe('Server restart', function () {
-
- it('Should still be able to run video edition after a server restart', async function () {
- this.timeout(240_000)
-
- await renewVideo()
- await servers[0].videoStudio.createEditionTasks({ videoId: videoUUID, tasks: VideoStudioCommand.getComplexTask() })
-
- await servers[0].kill()
- await servers[0].run()
-
- await waitJobs(servers)
-
- for (const server of servers) {
- await checkVideoDuration(server, videoUUID, 9)
- }
- })
- it('Should have an empty persistent tmp directory', async function () {
- await checkPersistentTmpIsEmpty(servers[0])
+ after(async function () {
+ await objectStorage.cleanupMock()
})
})