1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Regenerate video filenames on transcoding

In particular when using manual transcoding, to invalidate potential
HTTP caches in front of peertube
This commit is contained in:
Chocobozzz 2022-07-25 10:57:16 +02:00
parent 4f50475c67
commit 7b6b445d91
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 93 additions and 16 deletions

View file

@ -46,6 +46,8 @@ function runTests (objectStorage: boolean) {
let videoUUID: string
let publishedAt: string
let shouldBeDeleted: string[]
before(async function () {
this.timeout(120000)
@ -187,6 +189,12 @@ function runTests (objectStorage: boolean) {
expect(videoDetails.streamingPlaylists[0].files).to.have.lengthOf(1)
if (objectStorage) await checkFilesInObjectStorage(videoDetails)
shouldBeDeleted = [
videoDetails.streamingPlaylists[0].files[0].fileUrl,
videoDetails.streamingPlaylists[0].playlistUrl,
videoDetails.streamingPlaylists[0].segmentsSha256Url
]
}
await servers[0].config.updateExistingSubConfig({
@ -227,6 +235,12 @@ function runTests (objectStorage: boolean) {
}
})
it('Should have correctly deleted previous files', async function () {
for (const fileUrl of shouldBeDeleted) {
await makeRawRequest(fileUrl, HttpStatusCode.NOT_FOUND_404)
}
})
it('Should not have updated published at attributes', async function () {
const video = await servers[0].videos.get({ id: videoUUID })