]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Remove low timeouts
authorChocobozzz <me@florianbigard.com>
Mon, 22 May 2023 07:20:28 +0000 (09:20 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 22 May 2023 07:22:08 +0000 (09:22 +0200)
Default timeout is 30s

32 files changed:
server/tests/api/activitypub/refresher.ts
server/tests/api/activitypub/security.ts
server/tests/api/check-params/plugins.ts
server/tests/api/check-params/search.ts
server/tests/api/live/live.ts
server/tests/api/moderation/abuses.ts
server/tests/api/moderation/blocklist-notification.ts
server/tests/api/moderation/blocklist.ts
server/tests/api/search/search-index.ts
server/tests/api/server/contact-form.ts
server/tests/api/server/email.ts
server/tests/api/server/follows-moderation.ts
server/tests/api/server/logs.ts
server/tests/api/server/plugins.ts
server/tests/api/server/tracker.ts
server/tests/api/transcoding/hls.ts
server/tests/api/users/users-email-verification.ts
server/tests/api/users/users-multiple-servers.ts
server/tests/api/videos/single-server.ts
server/tests/api/videos/video-change-ownership.ts
server/tests/api/videos/video-channels.ts
server/tests/api/videos/video-description.ts
server/tests/api/videos/video-privacy.ts
server/tests/api/videos/video-schedule-update.ts
server/tests/api/videos/videos-overview.ts
server/tests/cli/peertube.ts
server/tests/external-plugins/auto-block-videos.ts
server/tests/external-plugins/auto-mute.ts
server/tests/plugins/external-auth.ts
server/tests/plugins/id-and-pass-auth.ts
server/tests/plugins/plugin-helpers.ts
server/tests/shared/directories.ts

index 6c48b7ac8d312613520a27478e51a25cfd1ab777..4ea7929ec5859f7cbff6d5e06f2970d36e96c3c0 100644 (file)
@@ -150,8 +150,6 @@ describe('Test AP refresher', function () {
   })
 
   after(async function () {
-    this.timeout(10000)
-
     await sqlCommandServer2.cleanup()
 
     await cleanupTests(servers)
index 6cf504f6f348dc9f644f3e00ebe51d682f91e2c0..31ebc89b421ef499518d6d328d9a9759fd7f59a8 100644 (file)
@@ -220,8 +220,6 @@ describe('Test ActivityPub security', function () {
 
   describe('When checking Linked Data Signature', function () {
     before(async function () {
-      this.timeout(10000)
-
       await setKeysOfServer(sqlCommands[0], servers[1].url, keys.publicKey, keys.privateKey)
       await setKeysOfServer(sqlCommands[1], servers[1].url, keys.publicKey, keys.privateKey)
       await setKeysOfServer(sqlCommands[2], servers[2].url, keys.publicKey, keys.privateKey)
@@ -232,8 +230,6 @@ describe('Test ActivityPub security', function () {
     })
 
     it('Should fail with bad keys', async function () {
-      this.timeout(10000)
-
       await setKeysOfServer(sqlCommands[0], servers[2].url, invalidKeys.publicKey, invalidKeys.privateKey)
       await setKeysOfServer(sqlCommands[2], servers[2].url, invalidKeys.publicKey, invalidKeys.privateKey)
 
@@ -254,8 +250,6 @@ describe('Test ActivityPub security', function () {
     })
 
     it('Should fail with an altered body', async function () {
-      this.timeout(10000)
-
       await setKeysOfServer(sqlCommands[0], servers[2].url, keys.publicKey, keys.privateKey)
       await setKeysOfServer(sqlCommands[0], servers[2].url, keys.publicKey, keys.privateKey)
 
@@ -278,8 +272,6 @@ describe('Test ActivityPub security', function () {
     })
 
     it('Should succeed with a valid signature', async function () {
-      this.timeout(10000)
-
       const body = getAnnounceWithoutContext(servers[1])
       body.actor = servers[2].url + '/accounts/peertube'
 
index 02f0d010d0d04cfbe87a60c7d6c9a32651a3a845..e08cd7ab88b03879af352f3358e7e987104c411e 100644 (file)
@@ -466,8 +466,6 @@ describe('Test server plugins API validators', function () {
     })
 
     it('Should succeed with the correct parameters', async function () {
-      this.timeout(10000)
-
       const it = [
         { suffix: 'install', status: HttpStatusCode.OK_200 },
         { suffix: 'update', status: HttpStatusCode.OK_200 },
index 72c25ba331e735bf81c9778d9c9754867b608cad..b04d30b7fc49a6fc7efd50334f887f0275ad7c91 100644 (file)
@@ -219,8 +219,6 @@ describe('Test videos API validator', function () {
   describe('Search target', function () {
 
     it('Should fail/succeed depending on the search target', async function () {
-      this.timeout(10000)
-
       const query = { search: 'coucou' }
       const paths = [
         '/api/v1/search/video-playlists/',
index 592548b52b9dcc1f2bd22337fac35a28c978ecca..65ebbc5f7b371e2213231d6d809c205101e969ae 100644 (file)
@@ -181,8 +181,6 @@ describe('Test live', function () {
     })
 
     it('Should update the live', async function () {
-      this.timeout(10000)
-
       await commands[0].update({ videoId: liveVideoUUID, fields: { saveReplay: false, latencyMode: LiveVideoLatencyMode.DEFAULT } })
       await waitJobs(servers)
     })
@@ -206,8 +204,6 @@ describe('Test live', function () {
     })
 
     it('Delete the live', async function () {
-      this.timeout(10000)
-
       await servers[0].videos.remove({ id: liveVideoUUID })
       await waitJobs(servers)
     })
index d9c164c439a3ef356b0d4f486f0c309e74ebd36e..9fc296ea890957320121c27fb42470e5e10747ff 100644 (file)
@@ -124,8 +124,6 @@ describe('Test abuses', function () {
     })
 
     it('Should report abuse on a remote video', async function () {
-      this.timeout(10000)
-
       const reason = 'my super bad reason 2'
       const videoId = await servers[0].videos.getId({ uuid: servers[1].store.videoCreated.uuid })
       await commands[0].report({ videoId, reason })
@@ -197,8 +195,6 @@ describe('Test abuses', function () {
     })
 
     it('Should hide video abuses from blocked accounts', async function () {
-      this.timeout(10000)
-
       {
         const videoId = await servers[1].videos.getId({ uuid: servers[0].store.videoCreated.uuid })
         await commands[1].report({ videoId, reason: 'will mute this' })
@@ -250,8 +246,6 @@ describe('Test abuses', function () {
     })
 
     it('Should keep the video abuse when deleting the video', async function () {
-      this.timeout(10000)
-
       await servers[1].videos.remove({ id: abuseServer2.video.uuid })
 
       await waitJobs(servers)
@@ -268,8 +262,6 @@ describe('Test abuses', function () {
     })
 
     it('Should include counts of reports from reporter and reportee', async function () {
-      this.timeout(10000)
-
       // register a second user to have two reporters/reportees
       const user = { username: 'user2', password: 'password' }
       await servers[0].users.create({ ...user })
@@ -307,8 +299,6 @@ describe('Test abuses', function () {
     })
 
     it('Should list predefined reasons as well as timestamps for the reported video', async function () {
-      this.timeout(10000)
-
       const reason5 = 'my super bad reason 5'
       const predefinedReasons5: AbusePredefinedReasonsString[] = [ 'violentOrRepulsive', 'captions' ]
       const createRes = await commands[0].report({
@@ -331,8 +321,6 @@ describe('Test abuses', function () {
     })
 
     it('Should delete the video abuse', async function () {
-      this.timeout(10000)
-
       await commands[1].delete({ abuseId: abuseServer2.id })
 
       await waitJobs(servers)
@@ -351,8 +339,6 @@ describe('Test abuses', function () {
     })
 
     it('Should list and filter video abuses', async function () {
-      this.timeout(10000)
-
       async function list (query: Parameters<AbusesCommand['getAdminList']>[0]) {
         const body = await commands[0].getAdminList(query)
 
@@ -457,8 +443,6 @@ describe('Test abuses', function () {
     })
 
     it('Should report abuse on a remote comment', async function () {
-      this.timeout(10000)
-
       const comment = await getComment(servers[0], servers[1].store.videoCreated.uuid)
 
       const reason = 'it is a really bad comment'
@@ -525,8 +509,6 @@ describe('Test abuses', function () {
     })
 
     it('Should keep the comment abuse when deleting the comment', async function () {
-      this.timeout(10000)
-
       const commentServer2 = await getComment(servers[0], servers[1].store.videoCreated.uuid)
 
       await servers[0].comments.delete({ videoId: servers[1].store.videoCreated.uuid, commentId: commentServer2.id })
@@ -546,8 +528,6 @@ describe('Test abuses', function () {
     })
 
     it('Should delete the comment abuse', async function () {
-      this.timeout(10000)
-
       await commands[1].delete({ abuseId: abuseServer2.id })
 
       await waitJobs(servers)
@@ -645,8 +625,6 @@ describe('Test abuses', function () {
     })
 
     it('Should report abuse on a remote account', async function () {
-      this.timeout(10000)
-
       const account = await getAccountFromServer(servers[0], 'user_2', servers[1])
 
       const reason = 'it is a really bad account'
@@ -699,8 +677,6 @@ describe('Test abuses', function () {
     })
 
     it('Should keep the account abuse when deleting the account', async function () {
-      this.timeout(10000)
-
       const account = await getAccountFromServer(servers[1], 'user_2', servers[1])
       await servers[1].users.remove({ userId: account.userId })
 
@@ -715,8 +691,6 @@ describe('Test abuses', function () {
     })
 
     it('Should delete the account abuse', async function () {
-      this.timeout(10000)
-
       await commands[1].delete({ abuseId: abuseServer2.id })
 
       await waitJobs(servers)
index eb092a1df8eeba0f1e9ae94f9e3cb311bbd54243..9c2863a58b5de17963bd61aa0421e973ab34e78c 100644 (file)
@@ -113,8 +113,6 @@ describe('Test blocklist notifications', function () {
     })
 
     it('Should block an account', async function () {
-      this.timeout(10000)
-
       await servers[0].blocklist.addToMyBlocklist({ token: userToken1, account: 'user3@' + servers[1].host })
       await waitJobs(servers)
     })
@@ -146,8 +144,6 @@ describe('Test blocklist notifications', function () {
     })
 
     it('Should block an account', async function () {
-      this.timeout(10000)
-
       await servers[0].blocklist.addToMyBlocklist({ token: userToken1, server: servers[1].host })
       await waitJobs(servers)
     })
@@ -186,8 +182,6 @@ describe('Test blocklist notifications', function () {
     })
 
     it('Should block an account', async function () {
-      this.timeout(10000)
-
       await servers[0].blocklist.addToServerBlocklist({ account: 'user3@' + servers[1].host })
       await waitJobs(servers)
     })
@@ -221,8 +215,6 @@ describe('Test blocklist notifications', function () {
     })
 
     it('Should block an account', async function () {
-      this.timeout(10000)
-
       await servers[0].blocklist.addToServerBlocklist({ server: servers[1].host })
       await waitJobs(servers)
     })
index 47d29e7f83de3dc67ba034c534737cb806e2f925..b90d8c16c0df94b3664afabf61304aa502d196e1 100644 (file)
@@ -439,8 +439,6 @@ describe('Test blocklist', function () {
       })
 
       it('Should hide its comments', async function () {
-        this.timeout(10000)
-
         const { id } = await commentsCommand[1].createThread({ token: userToken2, videoId: videoUUID1, text: 'hidden comment 2' })
 
         await waitJobs(servers)
@@ -767,8 +765,6 @@ describe('Test blocklist', function () {
       })
 
       it('Should hide its comments', async function () {
-        this.timeout(10000)
-
         const { id } = await commentsCommand[1].createThread({ token: userToken2, videoId: videoUUID1, text: 'hidden comment 2' })
 
         await waitJobs(servers)
index c8be762d2b79c6e08e9a40b915917468a7550a93..21473b6bf0a02e991996b7dadbd321204a490a36 100644 (file)
@@ -32,8 +32,6 @@ describe('Test index search', function () {
   describe('Default search', async function () {
 
     it('Should make a local videos search by default', async function () {
-      this.timeout(10000)
-
       await server.config.updateCustomSubConfig({
         newConfig: {
           search: {
index dd971203a050ccf3560311e582eb831cc0c2b45d..0256cc193f77cb553ad13a705d2bd309b63fdb7f 100644 (file)
@@ -31,8 +31,6 @@ describe('Test contact form', function () {
   })
 
   it('Should send a contact form', async function () {
-    this.timeout(10000)
-
     await command.send({
       fromEmail: 'toto@example.com',
       body: 'my super message',
@@ -61,8 +59,6 @@ describe('Test contact form', function () {
   })
 
   it('Should not be able to send another contact form because of the anti spam checker', async function () {
-    this.timeout(10000)
-
     await wait(1000)
 
     await command.send({
index 5a0bf360cb758149cdc72d536753c71aad990818..9141cc697f1c69be81ad5bd7280aaccb6ee6721c 100644 (file)
@@ -124,8 +124,6 @@ describe('Test emails', function () {
   describe('When creating a user without password', function () {
 
     it('Should send a create password email', async function () {
-      this.timeout(10000)
-
       await server.users.create({ username: 'create_password', password: '' })
 
       await waitJobs(server)
@@ -179,8 +177,6 @@ describe('Test emails', function () {
   describe('When creating an abuse', function () {
 
     it('Should send the notification email', async function () {
-      this.timeout(10000)
-
       const reason = 'my super bad reason'
       await server.abuses.report({ token: userAccessToken, videoId, reason })
 
@@ -200,8 +196,6 @@ describe('Test emails', function () {
   describe('When blocking/unblocking user', function () {
 
     it('Should send the notification email when blocking a user', async function () {
-      this.timeout(10000)
-
       const reason = 'my super bad reason'
       await server.users.banUser({ userId, reason })
 
@@ -219,8 +213,6 @@ describe('Test emails', function () {
     })
 
     it('Should send the notification email when unblocking a user', async function () {
-      this.timeout(10000)
-
       await server.users.unbanUser({ userId })
 
       await waitJobs(server)
@@ -238,8 +230,6 @@ describe('Test emails', function () {
 
   describe('When blacklisting a video', function () {
     it('Should send the notification email', async function () {
-      this.timeout(10000)
-
       const reason = 'my super reason'
       await server.blacklist.add({ videoId: videoUserUUID, reason })
 
@@ -257,8 +247,6 @@ describe('Test emails', function () {
     })
 
     it('Should send the notification email', async function () {
-      this.timeout(10000)
-
       await server.blacklist.remove({ videoId: videoUserUUID })
 
       await waitJobs(server)
@@ -282,8 +270,6 @@ describe('Test emails', function () {
   describe('When verifying a user email', function () {
 
     it('Should ask to send the verification email', async function () {
-      this.timeout(10000)
-
       await server.users.askSendVerifyEmail({ email: 'user_1@example.com' })
 
       await waitJobs(server)
@@ -337,8 +323,6 @@ describe('Test emails', function () {
     })
 
     it('Should ask to send the verification email', async function () {
-      this.timeout(10000)
-
       await server.registrations.askSendVerifyEmail({ email: 'request_1@example.com' })
 
       await waitJobs(server)
index 45e56518a2196713c033153e3af8fe5bd56b7336..d145dd9d2c9b27c33d521e0f3d517d1771348a6a 100644 (file)
@@ -111,8 +111,6 @@ describe('Test follows moderation', function () {
     })
 
     it('Should remove follower on server 2', async function () {
-      this.timeout(10000)
-
       await commands[1].removeFollower({ follower: servers[0] })
 
       await waitJobs(servers)
@@ -126,8 +124,6 @@ describe('Test follows moderation', function () {
   describe('Disabled/Enabled followers', function () {
 
     it('Should disable followers on server 2', async function () {
-      this.timeout(10000)
-
       const subConfig = {
         followers: {
           instance: {
@@ -146,8 +142,6 @@ describe('Test follows moderation', function () {
     })
 
     it('Should re enable followers on server 2', async function () {
-      this.timeout(10000)
-
       const subConfig = {
         followers: {
           instance: {
@@ -193,8 +187,6 @@ describe('Test follows moderation', function () {
     })
 
     it('Should accept a follower', async function () {
-      this.timeout(10000)
-
       await commands[1].acceptFollower({ follower: 'peertube@' + servers[0].host })
       await waitJobs(servers)
 
index a662992e01010bb52b27a6bb871ba98eda9466c9..e2079f29096d13cb5fe212b121562ac8fd90a574 100644 (file)
@@ -114,8 +114,6 @@ describe('Test logs', function () {
     })
 
     it('Should log ping requests', async function () {
-      this.timeout(10000)
-
       const now = new Date()
 
       await server.servers.ping()
index 199d205c79e86cf0ac3fb2197cd2866b44239a0e..a0e9db1d3c840ea7dac7c824362936bdfb22cb76 100644 (file)
@@ -189,8 +189,6 @@ describe('Test plugins', function () {
   })
 
   it('Should have watched settings changes', async function () {
-    this.timeout(10000)
-
     await server.servers.waitUntilLog('Settings changed!')
   })
 
index edc1b3123c54d40cf405d0bbe36b8fdd8bd78ea3..34d450998dc6aa1d16d8d050e3c730c4ef0b26a1 100644 (file)
@@ -27,7 +27,6 @@ describe('Test tracker', function () {
   })
 
   it('Should succeed with the correct infohash', function (done) {
-    this.timeout(10000)
     const webtorrent = new WebTorrent()
 
     const torrent = webtorrent.add(goodMagnet)
index 84a53c0bdacd1e4562f7ace5ce4c4ea130369a86..b6e4fe8e5a52d7be4b58bec68b056ab75e137f4c 100644 (file)
@@ -60,8 +60,6 @@ describe('Test HLS videos', function () {
     })
 
     it('Should delete videos', async function () {
-      this.timeout(10000)
-
       for (const uuid of videoUUIDs) {
         await servers[0].videos.remove({ id: uuid })
       }
index cb84dc75868cbcfccd050dd8f69737e444589b9f..909226311bc1d361fcc1aa77dd1e36347cc1a025 100644 (file)
@@ -90,8 +90,6 @@ describe('Test users email verification', function () {
   })
 
   it('Should be able to change the user email', async function () {
-    this.timeout(10000)
-
     let updateVerificationString: string
 
     {
index 8d94362479ac7265bd087d8de99bdbf1c713d1c4..3823b74eff6a713c11b1d7dc38a3f75e178f03e7 100644 (file)
@@ -66,8 +66,6 @@ describe('Test users with multiple servers', function () {
   })
 
   it('Should be able to update my display name', async function () {
-    this.timeout(10000)
-
     await servers[0].users.updateMe({ displayName: 'my super display name' })
 
     user = await servers[0].users.getMyInfo()
index b44e1bc376a22260d32a267486e938528694ce98..0cb64d5a50d7a9c7606dc7f361394bb85de408c8 100644 (file)
@@ -136,8 +136,6 @@ describe('Test a single server', function () {
     })
 
     it('Should upload the video', async function () {
-      this.timeout(10000)
-
       const attributes = {
         name: 'my super name',
         category: 2,
index e9ef674931ff38b6b11d28d978b0abb6a45bd8ed..99d774c2b175e5a68d0037ff607ebb4013a1967d 100644 (file)
@@ -130,14 +130,10 @@ describe('Test video change ownership - nominal', function () {
   })
 
   it('Should accept the same change ownership request without crashing', async function () {
-    this.timeout(10000)
-
     await command.create({ token: firstUserToken, videoId: servers[0].store.videoCreated.id, username: secondUser })
   })
 
   it('Should not create multiple change ownership requests while one is waiting', async function () {
-    this.timeout(10000)
-
     const body = await command.list({ token: secondUserToken })
 
     expect(body.total).to.equal(1)
@@ -146,14 +142,10 @@ describe('Test video change ownership - nominal', function () {
   })
 
   it('Should not be possible to refuse the change of ownership from first user', async function () {
-    this.timeout(10000)
-
     await command.refuse({ token: firstUserToken, ownershipId: lastRequestId, expectedStatus: HttpStatusCode.FORBIDDEN_403 })
   })
 
   it('Should be possible to refuse the change of ownership from second user', async function () {
-    this.timeout(10000)
-
     await command.refuse({ token: secondUserToken, ownershipId: lastRequestId })
   })
 
@@ -184,8 +176,6 @@ describe('Test video change ownership - nominal', function () {
   })
 
   it('Should not be possible to accept the change of ownership from first user', async function () {
-    this.timeout(10000)
-
     await command.accept({
       token: firstUserToken,
       ownershipId: lastRequestId,
@@ -195,8 +185,6 @@ describe('Test video change ownership - nominal', function () {
   })
 
   it('Should be possible to accept the change of ownership from second user', async function () {
-    this.timeout(10000)
-
     await command.accept({ token: secondUserToken, ownershipId: lastRequestId, channelId: secondUserChannelId })
 
     await waitJobs(servers)
@@ -309,8 +297,6 @@ describe('Test video change ownership - quota too small', function () {
   })
 
   it('Should not be possible to accept the change of ownership from second user because of exceeded quota', async function () {
-    this.timeout(10000)
-
     const { videoChannels } = await server.users.getMyInfo({ token: secondUserToken })
     const channelId = videoChannels[0].id
 
index 8e2b7937c5b77566cd6ac20adb9f36289373f5ba..f7cf84618d32304f52adc27a05652c268ce993c9 100644 (file)
@@ -378,8 +378,6 @@ describe('Test video channels', function () {
   })
 
   it('Should list the second video channel videos', async function () {
-    this.timeout(10000)
-
     for (const server of servers) {
       const channelURI = 'second_video_channel@' + servers[0].host
       const { total, data } = await server.videos.listByChannel({ handle: channelURI })
@@ -392,16 +390,12 @@ describe('Test video channels', function () {
   })
 
   it('Should change the video channel of a video', async function () {
-    this.timeout(10000)
-
     await servers[0].videos.update({ id: videoUUID, attributes: { channelId: servers[0].store.channel.id } })
 
     await waitJobs(servers)
   })
 
   it('Should list the first video channel videos', async function () {
-    this.timeout(10000)
-
     for (const server of servers) {
       {
         const secondChannelURI = 'second_video_channel@' + servers[0].host
@@ -452,8 +446,6 @@ describe('Test video channels', function () {
   })
 
   it('Should report correct channel views per days', async function () {
-    this.timeout(10000)
-
     {
       const { data } = await servers[0].channels.listByAccount({ accountName, withStats: true })
 
index c4185882a3d1b167a3fa3901578942a3f7751d62..1f3d4adbb5fb57d5e9460566b9e980dc072ffc99 100644 (file)
@@ -78,8 +78,6 @@ describe('Test video description', function () {
   })
 
   it('Should update with a short description', async function () {
-    this.timeout(10000)
-
     const attributes = {
       description: 'short description'
     }
index 264a05d3fa7ad2adcb278a9bea92baa39d94d51e..de96bcfcc6609ddd7e5cfbb35394cb2782975a5e 100644 (file)
@@ -99,8 +99,6 @@ describe('Test video privacy', function () {
     })
 
     it('Should not be able to watch the private video with another user', async function () {
-      this.timeout(10000)
-
       const user = {
         username: 'hello',
         password: 'super password'
@@ -254,8 +252,6 @@ describe('Test video privacy', function () {
     })
 
     it('Should set these videos as private and internal', async function () {
-      this.timeout(10000)
-
       await servers[0].videos.update({ id: internalVideoId, attributes: { privacy: VideoPrivacy.PRIVATE } })
       await servers[0].videos.update({ id: privateVideoId, attributes: { privacy: VideoPrivacy.INTERNAL } })
 
index 73f1519d9dddf9373a8ca3ea9daaf1b42600477b..bf341c648570d7b3e2857fc1847a539c8ea90e92 100644 (file)
@@ -35,8 +35,6 @@ describe('Test video update scheduler', function () {
   })
 
   it('Should upload a video and schedule an update in 10 seconds', async function () {
-    this.timeout(10000)
-
     const attributes = {
       name: 'video 1',
       privacy: VideoPrivacy.PRIVATE,
@@ -89,8 +87,6 @@ describe('Test video update scheduler', function () {
   })
 
   it('Should upload a video without scheduling an update', async function () {
-    this.timeout(10000)
-
     const attributes = {
       name: 'video 2',
       privacy: VideoPrivacy.PRIVATE
@@ -103,8 +99,6 @@ describe('Test video update scheduler', function () {
   })
 
   it('Should update a video by scheduling an update', async function () {
-    this.timeout(10000)
-
     const attributes = {
       name: 'video 2 updated',
       scheduleUpdate: {
index 6e723c5101b2e0f53cdcf4a6f124c6b8276f059d..f2496e35ecbba81112dc691c71279cf054035405 100644 (file)
@@ -47,7 +47,7 @@ describe('Test a videos overview', function () {
   })
 
   it('Should upload another video and include all videos in the overview', async function () {
-    this.timeout(60000)
+    this.timeout(120000)
 
     {
       for (let i = 1; i < 6; i++) {
index 400d5867c07115737c7374dc3d18835688921115..ad14fde9131806b080a00a692bb8391e358dcbf2 100644 (file)
@@ -321,15 +321,11 @@ describe('Test CLI wrapper', function () {
     })
 
     after(async function () {
-      this.timeout(10000)
-
       await cleanupTests([ anotherServer ])
     })
   })
 
   after(async function () {
-    this.timeout(10000)
-
     await cleanupTests([ server ])
   })
 })
index cadd02e8d624f573693587fd464f7e5787594afd..95d7a4b58a5908185ca8f65aef1fb89d03bda6d7 100644 (file)
@@ -71,8 +71,6 @@ describe('Official plugin auto-block videos', function () {
   })
 
   it('Should auto block a video', async function () {
-    this.timeout(10000)
-
     await check(servers[0], server2Videos[0].uuid, true)
 
     blocklistServer.replace({
@@ -98,8 +96,6 @@ describe('Official plugin auto-block videos', function () {
   })
 
   it('Should not block a local video', async function () {
-    this.timeout(10000)
-
     await check(servers[0], server1Videos[0].uuid, true)
 
     blocklistServer.replace({
@@ -116,8 +112,6 @@ describe('Official plugin auto-block videos', function () {
   })
 
   it('Should remove a video block', async function () {
-    this.timeout(10000)
-
     await check(servers[0], server2Videos[0].uuid, false)
 
     blocklistServer.replace({
index cfed76e8856c7a2931bd66b842a4f3e2beb2bd8a..a9bf3c173a963a39500a19a3fb5bd34cea2e7c3e 100644 (file)
@@ -50,8 +50,6 @@ describe('Official plugin auto-mute', function () {
   })
 
   it('Should add a server blocklist', async function () {
-    this.timeout(10000)
-
     blocklistServer.replace({
       data: [
         {
@@ -67,8 +65,6 @@ describe('Official plugin auto-mute', function () {
   })
 
   it('Should remove a server blocklist', async function () {
-    this.timeout(10000)
-
     blocklistServer.replace({
       data: [
         {
@@ -85,8 +81,6 @@ describe('Official plugin auto-mute', function () {
   })
 
   it('Should add an account blocklist', async function () {
-    this.timeout(10000)
-
     blocklistServer.replace({
       data: [
         {
@@ -102,8 +96,6 @@ describe('Official plugin auto-mute', function () {
   })
 
   it('Should remove an account blocklist', async function () {
-    this.timeout(10000)
-
     blocklistServer.replace({
       data: [
         {
index e600f958f89bb68657713cadbf64f17387d2abc0..e4015939a986192adc6191eaaf89c09f1fd1eefc 100644 (file)
@@ -290,8 +290,6 @@ describe('Test external auth plugins', function () {
   })
 
   it('Should reject token of Kefka by the plugin hook', async function () {
-    this.timeout(10000)
-
     await wait(5000)
 
     await server.users.getMyInfo({ token: kefkaAccessToken, expectedStatus: HttpStatusCode.UNAUTHORIZED_401 })
index 10155c28b667be5087fc4d5b28e56b75c2905d82..127c29cbc357de208794adcb280be2a6955787dc 100644 (file)
@@ -163,8 +163,6 @@ describe('Test id and pass auth plugins', function () {
   })
 
   it('Should reject token of laguna by the plugin hook', async function () {
-    this.timeout(10000)
-
     await wait(5000)
 
     await server.users.getMyInfo({ token: lagunaAccessToken, expectedStatus: HttpStatusCode.UNAUTHORIZED_401 })
index a47b7d4d2ffe040d612718598b624a7653c78f8d..e951a1299c02bc92a30e2f1fed33a8dbcf0a4cb8 100644 (file)
@@ -219,7 +219,6 @@ describe('Test plugin helpers', function () {
     })
 
     it('Should mute server 2', async function () {
-      this.timeout(10000)
       await postCommand(servers[0], 'blockServer', { hostToBlock: servers[1].host })
 
       const { data } = await servers[0].videos.list()
@@ -254,8 +253,6 @@ describe('Test plugin helpers', function () {
     })
 
     it('Should blacklist video', async function () {
-      this.timeout(10000)
-
       await postCommand(servers[0], 'blacklist', { videoUUID: videoUUIDServer1, unfederate: true })
 
       await waitJobs(servers)
@@ -269,8 +266,6 @@ describe('Test plugin helpers', function () {
     })
 
     it('Should unblacklist video', async function () {
-      this.timeout(10000)
-
       await postCommand(servers[0], 'unblacklist', { videoUUID: videoUUIDServer1 })
 
       await waitJobs(servers)
index 22578bc0e855d13d75cf27e4f79adc9ef4f14724..5ad12d78ab78495d507f06b8cf7203214a97b8a4 100644 (file)
@@ -39,5 +39,5 @@ export async function checkPeerTubeRunnerCacheIsEmpty (runner: PeerTubeRunnerPro
 
   const files = await readdir(directoryPath)
 
-  expect(files).to.have.lengthOf(0)
+  expect(files, 'Directory content: ' + files.join(', ')).to.have.lengthOf(0)
 }