aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/server/servers.ts4
-rw-r--r--server/tests/utils/videos/videos.ts16
2 files changed, 12 insertions, 8 deletions
diff --git a/server/tests/utils/server/servers.ts b/server/tests/utils/server/servers.ts
index 878efe91a..8373c73ab 100644
--- a/server/tests/utils/server/servers.ts
+++ b/server/tests/utils/server/servers.ts
@@ -24,7 +24,9 @@ interface ServerInfo {
24 id: number 24 id: number
25 uuid: string 25 uuid: string
26 name: string 26 name: string
27 accountName: string 27 account: {
28 name: string
29 }
28 } 30 }
29 31
30 remoteVideo?: { 32 remoteVideo?: {
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts
index a06078d40..4b57f24b5 100644
--- a/server/tests/utils/videos/videos.ts
+++ b/server/tests/utils/videos/videos.ts
@@ -368,8 +368,10 @@ async function completeVideoCheck (
368 commentsEnabled: boolean 368 commentsEnabled: boolean
369 description: string 369 description: string
370 support: string 370 support: string
371 host: string 371 account: {
372 account: string 372 name: string
373 host: string
374 }
373 isLocal: boolean, 375 isLocal: boolean,
374 tags: string[], 376 tags: string[],
375 privacy: number, 377 privacy: number,
@@ -402,8 +404,8 @@ async function completeVideoCheck (
402 expect(video.languageLabel).to.equal(VIDEO_LANGUAGES[attributes.language] || 'Unknown') 404 expect(video.languageLabel).to.equal(VIDEO_LANGUAGES[attributes.language] || 'Unknown')
403 expect(video.nsfw).to.equal(attributes.nsfw) 405 expect(video.nsfw).to.equal(attributes.nsfw)
404 expect(video.description).to.equal(attributes.description) 406 expect(video.description).to.equal(attributes.description)
405 expect(video.serverHost).to.equal(attributes.host) 407 expect(video.account.host).to.equal(attributes.account.host)
406 expect(video.accountName).to.equal(attributes.account) 408 expect(video.account.name).to.equal(attributes.account.name)
407 expect(video.likes).to.equal(attributes.likes) 409 expect(video.likes).to.equal(attributes.likes)
408 expect(video.dislikes).to.equal(attributes.dislikes) 410 expect(video.dislikes).to.equal(attributes.dislikes)
409 expect(video.isLocal).to.equal(attributes.isLocal) 411 expect(video.isLocal).to.equal(attributes.isLocal)
@@ -433,12 +435,12 @@ async function completeVideoCheck (
433 435
434 let extension = extname(attributes.fixture) 436 let extension = extname(attributes.fixture)
435 // Transcoding enabled on server 2, extension will always be .mp4 437 // Transcoding enabled on server 2, extension will always be .mp4
436 if (attributes.host === 'localhost:9002') extension = '.mp4' 438 if (attributes.account.host === 'localhost:9002') extension = '.mp4'
437 439
438 const magnetUri = file.magnetUri 440 const magnetUri = file.magnetUri
439 expect(file.magnetUri).to.have.lengthOf.above(2) 441 expect(file.magnetUri).to.have.lengthOf.above(2)
440 expect(file.torrentUrl).to.equal(`http://${attributes.host}/static/torrents/${videoDetails.uuid}-${file.resolution}.torrent`) 442 expect(file.torrentUrl).to.equal(`http://${attributes.account.host}/static/torrents/${videoDetails.uuid}-${file.resolution}.torrent`)
441 expect(file.fileUrl).to.equal(`http://${attributes.host}/static/webseed/${videoDetails.uuid}-${file.resolution}${extension}`) 443 expect(file.fileUrl).to.equal(`http://${attributes.account.host}/static/webseed/${videoDetails.uuid}-${file.resolution}${extension}`)
442 expect(file.resolution).to.equal(attributeFile.resolution) 444 expect(file.resolution).to.equal(attributeFile.resolution)
443 expect(file.resolutionLabel).to.equal(attributeFile.resolution + 'p') 445 expect(file.resolutionLabel).to.equal(attributeFile.resolution + 'p')
444 446