From efa3fef23ecf4e1c5289f8715de184c272ea49f7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 8 Oct 2021 15:34:07 +0200 Subject: Fix notification on create transcoding job --- server/tests/cli/create-transcoding-job.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'server/tests/cli/create-transcoding-job.ts') diff --git a/server/tests/cli/create-transcoding-job.ts b/server/tests/cli/create-transcoding-job.ts index 3fd624091..2b388ab0c 100644 --- a/server/tests/cli/create-transcoding-job.ts +++ b/server/tests/cli/create-transcoding-job.ts @@ -33,9 +33,10 @@ async function checkFilesInObjectStorage (files: VideoFile[], type: 'webtorrent' function runTests (objectStorage: boolean) { let servers: PeerTubeServer[] = [] const videosUUID: string[] = [] + const publishedAt: string[] = [] before(async function () { - this.timeout(60000) + this.timeout(120000) const config = objectStorage ? ObjectStorageCommand.getDefaultConfig() @@ -54,6 +55,11 @@ function runTests (objectStorage: boolean) { for (let i = 1; i <= 5; i++) { const { uuid, shortUUID } = await servers[0].videos.upload({ attributes: { name: 'video' + i } }) + await waitJobs(servers) + + const video = await servers[0].videos.get({ id: uuid }) + publishedAt.push(video.publishedAt as string) + if (i > 2) { videosUUID.push(uuid) } else { @@ -225,6 +231,14 @@ function runTests (objectStorage: boolean) { } }) + it('Should not have updated published at attributes', async function () { + for (const id of videosUUID) { + const video = await servers[0].videos.get({ id }) + + expect(publishedAt.some(p => video.publishedAt === p)).to.be.true + } + }) + after(async function () { await cleanupTests(servers) }) -- cgit v1.2.3