aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-10-08 15:34:07 +0200
committerChocobozzz <me@florianbigard.com>2021-10-11 09:37:27 +0200
commit9db2330e4a32a3bb0fe821abec1b061e4edb65b5 (patch)
tree32c1a6c80792c50d0fb4aa98429b68c71c8cd365 /server/tests
parent731a32e334fc9eef63a97875d6290ceb34a94ce4 (diff)
downloadPeerTube-9db2330e4a32a3bb0fe821abec1b061e4edb65b5.tar.gz
PeerTube-9db2330e4a32a3bb0fe821abec1b061e4edb65b5.tar.zst
PeerTube-9db2330e4a32a3bb0fe821abec1b061e4edb65b5.zip
Fix notification on create transcoding job
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/cli/create-transcoding-job.ts16
1 files changed, 15 insertions, 1 deletions
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'
33function runTests (objectStorage: boolean) { 33function runTests (objectStorage: boolean) {
34 let servers: PeerTubeServer[] = [] 34 let servers: PeerTubeServer[] = []
35 const videosUUID: string[] = [] 35 const videosUUID: string[] = []
36 const publishedAt: string[] = []
36 37
37 before(async function () { 38 before(async function () {
38 this.timeout(60000) 39 this.timeout(120000)
39 40
40 const config = objectStorage 41 const config = objectStorage
41 ? ObjectStorageCommand.getDefaultConfig() 42 ? ObjectStorageCommand.getDefaultConfig()
@@ -54,6 +55,11 @@ function runTests (objectStorage: boolean) {
54 for (let i = 1; i <= 5; i++) { 55 for (let i = 1; i <= 5; i++) {
55 const { uuid, shortUUID } = await servers[0].videos.upload({ attributes: { name: 'video' + i } }) 56 const { uuid, shortUUID } = await servers[0].videos.upload({ attributes: { name: 'video' + i } })
56 57
58 await waitJobs(servers)
59
60 const video = await servers[0].videos.get({ id: uuid })
61 publishedAt.push(video.publishedAt as string)
62
57 if (i > 2) { 63 if (i > 2) {
58 videosUUID.push(uuid) 64 videosUUID.push(uuid)
59 } else { 65 } else {
@@ -225,6 +231,14 @@ function runTests (objectStorage: boolean) {
225 } 231 }
226 }) 232 })
227 233
234 it('Should not have updated published at attributes', async function () {
235 for (const id of videosUUID) {
236 const video = await servers[0].videos.get({ id })
237
238 expect(publishedAt.some(p => video.publishedAt === p)).to.be.true
239 }
240 })
241
228 after(async function () { 242 after(async function () {
229 await cleanupTests(servers) 243 await cleanupTests(servers)
230 }) 244 })