diff options
author | Chocobozzz <me@florianbigard.com> | 2023-04-21 15:00:01 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2023-05-09 08:57:34 +0200 |
commit | d102de1b38f2877463529c3b27bd35ffef4fd8bf (patch) | |
tree | 31fa0bdf26ad7a2ee46d600d804a6f03260266c8 /server/tests/api/videos/single-server.ts | |
parent | 2fe978744e5b74eb824e4d79c1bb9b840169f125 (diff) | |
download | PeerTube-d102de1b38f2877463529c3b27bd35ffef4fd8bf.tar.gz PeerTube-d102de1b38f2877463529c3b27bd35ffef4fd8bf.tar.zst PeerTube-d102de1b38f2877463529c3b27bd35ffef4fd8bf.zip |
Add runner server tests
Diffstat (limited to 'server/tests/api/videos/single-server.ts')
-rw-r--r-- | server/tests/api/videos/single-server.ts | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index e8e981e55..72f833ec2 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts | |||
@@ -164,14 +164,14 @@ describe('Test a single server', function () { | |||
164 | expect(data.length).to.equal(1) | 164 | expect(data.length).to.equal(1) |
165 | 165 | ||
166 | const video = data[0] | 166 | const video = data[0] |
167 | await completeVideoCheck(server, video, getCheckAttributes()) | 167 | await completeVideoCheck({ server, originServer: server, videoUUID: video.uuid, attributes: getCheckAttributes() }) |
168 | }) | 168 | }) |
169 | 169 | ||
170 | it('Should get the video by UUID', async function () { | 170 | it('Should get the video by UUID', async function () { |
171 | this.timeout(5000) | 171 | this.timeout(5000) |
172 | 172 | ||
173 | const video = await server.videos.get({ id: videoUUID }) | 173 | const video = await server.videos.get({ id: videoUUID }) |
174 | await completeVideoCheck(server, video, getCheckAttributes()) | 174 | await completeVideoCheck({ server, originServer: server, videoUUID: video.uuid, attributes: getCheckAttributes() }) |
175 | }) | 175 | }) |
176 | 176 | ||
177 | it('Should have the views updated', async function () { | 177 | it('Should have the views updated', async function () { |
@@ -360,7 +360,7 @@ describe('Test a single server', function () { | |||
360 | 360 | ||
361 | const video = await server.videos.get({ id: videoId }) | 361 | const video = await server.videos.get({ id: videoId }) |
362 | 362 | ||
363 | await completeVideoCheck(server, video, updateCheckAttributes()) | 363 | await completeVideoCheck({ server, originServer: server, videoUUID: video.uuid, attributes: updateCheckAttributes() }) |
364 | }) | 364 | }) |
365 | 365 | ||
366 | it('Should update only the tags of a video', async function () { | 366 | it('Should update only the tags of a video', async function () { |
@@ -371,7 +371,12 @@ describe('Test a single server', function () { | |||
371 | 371 | ||
372 | const video = await server.videos.get({ id: videoId }) | 372 | const video = await server.videos.get({ id: videoId }) |
373 | 373 | ||
374 | await completeVideoCheck(server, video, Object.assign(updateCheckAttributes(), attributes)) | 374 | await completeVideoCheck({ |
375 | server, | ||
376 | originServer: server, | ||
377 | videoUUID: video.uuid, | ||
378 | attributes: Object.assign(updateCheckAttributes(), attributes) | ||
379 | }) | ||
375 | }) | 380 | }) |
376 | 381 | ||
377 | it('Should update only the description of a video', async function () { | 382 | it('Should update only the description of a video', async function () { |
@@ -382,8 +387,12 @@ describe('Test a single server', function () { | |||
382 | 387 | ||
383 | const video = await server.videos.get({ id: videoId }) | 388 | const video = await server.videos.get({ id: videoId }) |
384 | 389 | ||
385 | const expectedAttributes = Object.assign(updateCheckAttributes(), { tags: [ 'supertag', 'tag1', 'tag2' ] }, attributes) | 390 | await completeVideoCheck({ |
386 | await completeVideoCheck(server, video, expectedAttributes) | 391 | server, |
392 | originServer: server, | ||
393 | videoUUID: video.uuid, | ||
394 | attributes: Object.assign(updateCheckAttributes(), { tags: [ 'supertag', 'tag1', 'tag2' ] }, attributes) | ||
395 | }) | ||
387 | }) | 396 | }) |
388 | 397 | ||
389 | it('Should like a video', async function () { | 398 | it('Should like a video', async function () { |