aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/single-server.ts2
-rw-r--r--server/tests/api/videos/video-change-ownership.ts14
-rw-r--r--server/tests/api/videos/video-channels.ts8
-rw-r--r--server/tests/api/videos/video-description.ts2
-rw-r--r--server/tests/api/videos/video-privacy.ts4
-rw-r--r--server/tests/api/videos/video-schedule-update.ts6
-rw-r--r--server/tests/api/videos/videos-overview.ts2
7 files changed, 1 insertions, 37 deletions
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts
index b44e1bc37..0cb64d5a5 100644
--- a/server/tests/api/videos/single-server.ts
+++ b/server/tests/api/videos/single-server.ts
@@ -136,8 +136,6 @@ describe('Test a single server', function () {
136 }) 136 })
137 137
138 it('Should upload the video', async function () { 138 it('Should upload the video', async function () {
139 this.timeout(10000)
140
141 const attributes = { 139 const attributes = {
142 name: 'my super name', 140 name: 'my super name',
143 category: 2, 141 category: 2,
diff --git a/server/tests/api/videos/video-change-ownership.ts b/server/tests/api/videos/video-change-ownership.ts
index e9ef67493..99d774c2b 100644
--- a/server/tests/api/videos/video-change-ownership.ts
+++ b/server/tests/api/videos/video-change-ownership.ts
@@ -130,14 +130,10 @@ describe('Test video change ownership - nominal', function () {
130 }) 130 })
131 131
132 it('Should accept the same change ownership request without crashing', async function () { 132 it('Should accept the same change ownership request without crashing', async function () {
133 this.timeout(10000)
134
135 await command.create({ token: firstUserToken, videoId: servers[0].store.videoCreated.id, username: secondUser }) 133 await command.create({ token: firstUserToken, videoId: servers[0].store.videoCreated.id, username: secondUser })
136 }) 134 })
137 135
138 it('Should not create multiple change ownership requests while one is waiting', async function () { 136 it('Should not create multiple change ownership requests while one is waiting', async function () {
139 this.timeout(10000)
140
141 const body = await command.list({ token: secondUserToken }) 137 const body = await command.list({ token: secondUserToken })
142 138
143 expect(body.total).to.equal(1) 139 expect(body.total).to.equal(1)
@@ -146,14 +142,10 @@ describe('Test video change ownership - nominal', function () {
146 }) 142 })
147 143
148 it('Should not be possible to refuse the change of ownership from first user', async function () { 144 it('Should not be possible to refuse the change of ownership from first user', async function () {
149 this.timeout(10000)
150
151 await command.refuse({ token: firstUserToken, ownershipId: lastRequestId, expectedStatus: HttpStatusCode.FORBIDDEN_403 }) 145 await command.refuse({ token: firstUserToken, ownershipId: lastRequestId, expectedStatus: HttpStatusCode.FORBIDDEN_403 })
152 }) 146 })
153 147
154 it('Should be possible to refuse the change of ownership from second user', async function () { 148 it('Should be possible to refuse the change of ownership from second user', async function () {
155 this.timeout(10000)
156
157 await command.refuse({ token: secondUserToken, ownershipId: lastRequestId }) 149 await command.refuse({ token: secondUserToken, ownershipId: lastRequestId })
158 }) 150 })
159 151
@@ -184,8 +176,6 @@ describe('Test video change ownership - nominal', function () {
184 }) 176 })
185 177
186 it('Should not be possible to accept the change of ownership from first user', async function () { 178 it('Should not be possible to accept the change of ownership from first user', async function () {
187 this.timeout(10000)
188
189 await command.accept({ 179 await command.accept({
190 token: firstUserToken, 180 token: firstUserToken,
191 ownershipId: lastRequestId, 181 ownershipId: lastRequestId,
@@ -195,8 +185,6 @@ describe('Test video change ownership - nominal', function () {
195 }) 185 })
196 186
197 it('Should be possible to accept the change of ownership from second user', async function () { 187 it('Should be possible to accept the change of ownership from second user', async function () {
198 this.timeout(10000)
199
200 await command.accept({ token: secondUserToken, ownershipId: lastRequestId, channelId: secondUserChannelId }) 188 await command.accept({ token: secondUserToken, ownershipId: lastRequestId, channelId: secondUserChannelId })
201 189
202 await waitJobs(servers) 190 await waitJobs(servers)
@@ -309,8 +297,6 @@ describe('Test video change ownership - quota too small', function () {
309 }) 297 })
310 298
311 it('Should not be possible to accept the change of ownership from second user because of exceeded quota', async function () { 299 it('Should not be possible to accept the change of ownership from second user because of exceeded quota', async function () {
312 this.timeout(10000)
313
314 const { videoChannels } = await server.users.getMyInfo({ token: secondUserToken }) 300 const { videoChannels } = await server.users.getMyInfo({ token: secondUserToken })
315 const channelId = videoChannels[0].id 301 const channelId = videoChannels[0].id
316 302
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts
index 8e2b7937c..f7cf84618 100644
--- a/server/tests/api/videos/video-channels.ts
+++ b/server/tests/api/videos/video-channels.ts
@@ -378,8 +378,6 @@ describe('Test video channels', function () {
378 }) 378 })
379 379
380 it('Should list the second video channel videos', async function () { 380 it('Should list the second video channel videos', async function () {
381 this.timeout(10000)
382
383 for (const server of servers) { 381 for (const server of servers) {
384 const channelURI = 'second_video_channel@' + servers[0].host 382 const channelURI = 'second_video_channel@' + servers[0].host
385 const { total, data } = await server.videos.listByChannel({ handle: channelURI }) 383 const { total, data } = await server.videos.listByChannel({ handle: channelURI })
@@ -392,16 +390,12 @@ describe('Test video channels', function () {
392 }) 390 })
393 391
394 it('Should change the video channel of a video', async function () { 392 it('Should change the video channel of a video', async function () {
395 this.timeout(10000)
396
397 await servers[0].videos.update({ id: videoUUID, attributes: { channelId: servers[0].store.channel.id } }) 393 await servers[0].videos.update({ id: videoUUID, attributes: { channelId: servers[0].store.channel.id } })
398 394
399 await waitJobs(servers) 395 await waitJobs(servers)
400 }) 396 })
401 397
402 it('Should list the first video channel videos', async function () { 398 it('Should list the first video channel videos', async function () {
403 this.timeout(10000)
404
405 for (const server of servers) { 399 for (const server of servers) {
406 { 400 {
407 const secondChannelURI = 'second_video_channel@' + servers[0].host 401 const secondChannelURI = 'second_video_channel@' + servers[0].host
@@ -452,8 +446,6 @@ describe('Test video channels', function () {
452 }) 446 })
453 447
454 it('Should report correct channel views per days', async function () { 448 it('Should report correct channel views per days', async function () {
455 this.timeout(10000)
456
457 { 449 {
458 const { data } = await servers[0].channels.listByAccount({ accountName, withStats: true }) 450 const { data } = await servers[0].channels.listByAccount({ accountName, withStats: true })
459 451
diff --git a/server/tests/api/videos/video-description.ts b/server/tests/api/videos/video-description.ts
index c4185882a..1f3d4adbb 100644
--- a/server/tests/api/videos/video-description.ts
+++ b/server/tests/api/videos/video-description.ts
@@ -78,8 +78,6 @@ describe('Test video description', function () {
78 }) 78 })
79 79
80 it('Should update with a short description', async function () { 80 it('Should update with a short description', async function () {
81 this.timeout(10000)
82
83 const attributes = { 81 const attributes = {
84 description: 'short description' 82 description: 'short description'
85 } 83 }
diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts
index 264a05d3f..de96bcfcc 100644
--- a/server/tests/api/videos/video-privacy.ts
+++ b/server/tests/api/videos/video-privacy.ts
@@ -99,8 +99,6 @@ describe('Test video privacy', function () {
99 }) 99 })
100 100
101 it('Should not be able to watch the private video with another user', async function () { 101 it('Should not be able to watch the private video with another user', async function () {
102 this.timeout(10000)
103
104 const user = { 102 const user = {
105 username: 'hello', 103 username: 'hello',
106 password: 'super password' 104 password: 'super password'
@@ -254,8 +252,6 @@ describe('Test video privacy', function () {
254 }) 252 })
255 253
256 it('Should set these videos as private and internal', async function () { 254 it('Should set these videos as private and internal', async function () {
257 this.timeout(10000)
258
259 await servers[0].videos.update({ id: internalVideoId, attributes: { privacy: VideoPrivacy.PRIVATE } }) 255 await servers[0].videos.update({ id: internalVideoId, attributes: { privacy: VideoPrivacy.PRIVATE } })
260 await servers[0].videos.update({ id: privateVideoId, attributes: { privacy: VideoPrivacy.INTERNAL } }) 256 await servers[0].videos.update({ id: privateVideoId, attributes: { privacy: VideoPrivacy.INTERNAL } })
261 257
diff --git a/server/tests/api/videos/video-schedule-update.ts b/server/tests/api/videos/video-schedule-update.ts
index 73f1519d9..bf341c648 100644
--- a/server/tests/api/videos/video-schedule-update.ts
+++ b/server/tests/api/videos/video-schedule-update.ts
@@ -35,8 +35,6 @@ describe('Test video update scheduler', function () {
35 }) 35 })
36 36
37 it('Should upload a video and schedule an update in 10 seconds', async function () { 37 it('Should upload a video and schedule an update in 10 seconds', async function () {
38 this.timeout(10000)
39
40 const attributes = { 38 const attributes = {
41 name: 'video 1', 39 name: 'video 1',
42 privacy: VideoPrivacy.PRIVATE, 40 privacy: VideoPrivacy.PRIVATE,
@@ -89,8 +87,6 @@ describe('Test video update scheduler', function () {
89 }) 87 })
90 88
91 it('Should upload a video without scheduling an update', async function () { 89 it('Should upload a video without scheduling an update', async function () {
92 this.timeout(10000)
93
94 const attributes = { 90 const attributes = {
95 name: 'video 2', 91 name: 'video 2',
96 privacy: VideoPrivacy.PRIVATE 92 privacy: VideoPrivacy.PRIVATE
@@ -103,8 +99,6 @@ describe('Test video update scheduler', function () {
103 }) 99 })
104 100
105 it('Should update a video by scheduling an update', async function () { 101 it('Should update a video by scheduling an update', async function () {
106 this.timeout(10000)
107
108 const attributes = { 102 const attributes = {
109 name: 'video 2 updated', 103 name: 'video 2 updated',
110 scheduleUpdate: { 104 scheduleUpdate: {
diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts
index 6e723c510..f2496e35e 100644
--- a/server/tests/api/videos/videos-overview.ts
+++ b/server/tests/api/videos/videos-overview.ts
@@ -47,7 +47,7 @@ describe('Test a videos overview', function () {
47 }) 47 })
48 48
49 it('Should upload another video and include all videos in the overview', async function () { 49 it('Should upload another video and include all videos in the overview', async function () {
50 this.timeout(60000) 50 this.timeout(120000)
51 51
52 { 52 {
53 for (let i = 1; i < 6; i++) { 53 for (let i = 1; i < 6; i++) {