diff options
Diffstat (limited to 'server/tests/cli/update-host.ts')
-rw-r--r-- | server/tests/cli/update-host.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts index 39242c494..ad56f7b1b 100644 --- a/server/tests/cli/update-host.ts +++ b/server/tests/cli/update-host.ts | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { VideoDetails } from '../../../shared/models/videos' | ||
5 | const expect = chai.expect | 6 | const expect = chai.expect |
6 | 7 | ||
7 | import { | 8 | import { |
@@ -59,7 +60,7 @@ describe('Test update host scripts', function () { | |||
59 | 60 | ||
60 | for (const video of videos) { | 61 | for (const video of videos) { |
61 | const res2 = await getVideo(server.url, video.id) | 62 | const res2 = await getVideo(server.url, video.id) |
62 | const videoDetails = res2.body | 63 | const videoDetails: VideoDetails = res2.body |
63 | 64 | ||
64 | expect(videoDetails.files).to.have.lengthOf(4) | 65 | expect(videoDetails.files).to.have.lengthOf(4) |
65 | 66 | ||
@@ -67,7 +68,7 @@ describe('Test update host scripts', function () { | |||
67 | expect(file.magnetUri).to.contain('localhost%3A9002%2Ftracker%2Fsocket') | 68 | expect(file.magnetUri).to.contain('localhost%3A9002%2Ftracker%2Fsocket') |
68 | expect(file.magnetUri).to.contain('localhost%3A9002%2Fstatic%2Fwebseed%2F') | 69 | expect(file.magnetUri).to.contain('localhost%3A9002%2Fstatic%2Fwebseed%2F') |
69 | 70 | ||
70 | const torrent = await parseTorrentVideo(server, videoDetails.uuid, file.resolution) | 71 | const torrent = await parseTorrentVideo(server, videoDetails.uuid, file.resolution.id) |
71 | const announceWS = torrent.announce.find(a => a === 'ws://localhost:9002/tracker/socket') | 72 | const announceWS = torrent.announce.find(a => a === 'ws://localhost:9002/tracker/socket') |
72 | expect(announceWS).to.not.be.undefined | 73 | expect(announceWS).to.not.be.undefined |
73 | 74 | ||