aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/transcoding/create-transcoding.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/tests/api/transcoding/create-transcoding.ts b/server/tests/api/transcoding/create-transcoding.ts
index a4defdf51..e3867fdad 100644
--- a/server/tests/api/transcoding/create-transcoding.ts
+++ b/server/tests/api/transcoding/create-transcoding.ts
@@ -46,6 +46,8 @@ function runTests (objectStorage: boolean) {
46 let videoUUID: string 46 let videoUUID: string
47 let publishedAt: string 47 let publishedAt: string
48 48
49 let shouldBeDeleted: string[]
50
49 before(async function () { 51 before(async function () {
50 this.timeout(120000) 52 this.timeout(120000)
51 53
@@ -187,6 +189,12 @@ function runTests (objectStorage: boolean) {
187 expect(videoDetails.streamingPlaylists[0].files).to.have.lengthOf(1) 189 expect(videoDetails.streamingPlaylists[0].files).to.have.lengthOf(1)
188 190
189 if (objectStorage) await checkFilesInObjectStorage(videoDetails) 191 if (objectStorage) await checkFilesInObjectStorage(videoDetails)
192
193 shouldBeDeleted = [
194 videoDetails.streamingPlaylists[0].files[0].fileUrl,
195 videoDetails.streamingPlaylists[0].playlistUrl,
196 videoDetails.streamingPlaylists[0].segmentsSha256Url
197 ]
190 } 198 }
191 199
192 await servers[0].config.updateExistingSubConfig({ 200 await servers[0].config.updateExistingSubConfig({
@@ -227,6 +235,12 @@ function runTests (objectStorage: boolean) {
227 } 235 }
228 }) 236 })
229 237
238 it('Should have correctly deleted previous files', async function () {
239 for (const fileUrl of shouldBeDeleted) {
240 await makeRawRequest(fileUrl, HttpStatusCode.NOT_FOUND_404)
241 }
242 })
243
230 it('Should not have updated published at attributes', async function () { 244 it('Should not have updated published at attributes', async function () {
231 const video = await servers[0].videos.get({ id: videoUUID }) 245 const video = await servers[0].videos.get({ id: videoUUID })
232 246