aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/update-host.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/cli/update-host.ts')
-rw-r--r--server/tests/cli/update-host.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts
index 7e1d3f658..4358f28e3 100644
--- a/server/tests/cli/update-host.ts
+++ b/server/tests/cli/update-host.ts
@@ -13,7 +13,8 @@ import {
13 ServerInfo, 13 ServerInfo,
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 uploadVideo, 15 uploadVideo,
16 wait 16 wait,
17 getVideo
17} from '../utils' 18} from '../utils'
18 19
19describe('Test update host scripts', function () { 20describe('Test update host scripts', function () {
@@ -55,13 +56,16 @@ describe('Test update host scripts', function () {
55 expect(videos).to.have.lengthOf(2) 56 expect(videos).to.have.lengthOf(2)
56 57
57 for (const video of videos) { 58 for (const video of videos) {
58 expect(video.files).to.have.lengthOf(4) 59 const res2 = await getVideo(server.url, video.id)
60 const videoDetails = res2.body
59 61
60 for (const file of video.files) { 62 expect(videoDetails.files).to.have.lengthOf(4)
63
64 for (const file of videoDetails.files) {
61 expect(file.magnetUri).to.contain('localhost%3A9002%2Ftracker%2Fsocket') 65 expect(file.magnetUri).to.contain('localhost%3A9002%2Ftracker%2Fsocket')
62 expect(file.magnetUri).to.contain('localhost%3A9002%2Fstatic%2Fwebseed%2F') 66 expect(file.magnetUri).to.contain('localhost%3A9002%2Fstatic%2Fwebseed%2F')
63 67
64 const torrent = await parseTorrentVideo(server, video.uuid, file.resolution) 68 const torrent = await parseTorrentVideo(server, videoDetails.uuid, file.resolution)
65 expect(torrent.announce[0]).to.equal('ws://localhost:9002/tracker/socket') 69 expect(torrent.announce[0]).to.equal('ws://localhost:9002/tracker/socket')
66 expect(torrent.urlList[0]).to.contain('http://localhost:9002/static/webseed') 70 expect(torrent.urlList[0]).to.contain('http://localhost:9002/static/webseed')
67 } 71 }