diff options
Diffstat (limited to 'server/tests/cli/update-host.ts')
-rw-r--r-- | server/tests/cli/update-host.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts index fcbcb55ba..43fbaec30 100644 --- a/server/tests/cli/update-host.ts +++ b/server/tests/cli/update-host.ts | |||
@@ -108,21 +108,22 @@ describe('Test update host scripts', function () { | |||
108 | 108 | ||
109 | for (const video of data) { | 109 | for (const video of data) { |
110 | const videoDetails = await server.videos.get({ id: video.id }) | 110 | const videoDetails = await server.videos.get({ id: video.id }) |
111 | const files = videoDetails.files.concat(videoDetails.streamingPlaylists[0].files) | ||
111 | 112 | ||
112 | expect(videoDetails.files).to.have.lengthOf(4) | 113 | expect(files).to.have.lengthOf(8) |
113 | 114 | ||
114 | for (const file of videoDetails.files) { | 115 | for (const file of files) { |
115 | expect(file.magnetUri).to.contain('localhost%3A9002%2Ftracker%2Fsocket') | 116 | expect(file.magnetUri).to.contain('localhost%3A9002%2Ftracker%2Fsocket') |
116 | expect(file.magnetUri).to.contain('localhost%3A9002%2Fstatic%2Fwebseed%2F') | 117 | expect(file.magnetUri).to.contain('localhost%3A9002%2Fstatic%2F') |
117 | 118 | ||
118 | const torrent = await parseTorrentVideo(server, videoDetails.uuid, file.resolution.id) | 119 | const torrent = await parseTorrentVideo(server, file) |
119 | const announceWS = torrent.announce.find(a => a === 'ws://localhost:9002/tracker/socket') | 120 | const announceWS = torrent.announce.find(a => a === 'ws://localhost:9002/tracker/socket') |
120 | expect(announceWS).to.not.be.undefined | 121 | expect(announceWS).to.not.be.undefined |
121 | 122 | ||
122 | const announceHttp = torrent.announce.find(a => a === 'http://localhost:9002/tracker/announce') | 123 | const announceHttp = torrent.announce.find(a => a === 'http://localhost:9002/tracker/announce') |
123 | expect(announceHttp).to.not.be.undefined | 124 | expect(announceHttp).to.not.be.undefined |
124 | 125 | ||
125 | expect(torrent.urlList[0]).to.contain('http://localhost:9002/static/webseed') | 126 | expect(torrent.urlList[0]).to.contain('http://localhost:9002/static/') |
126 | } | 127 | } |
127 | } | 128 | } |
128 | }) | 129 | }) |