diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-23 11:20:00 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-07-26 11:29:31 +0200 |
commit | 764b1a14fc494f2cfd7ea590d2f07b01df65c7ad (patch) | |
tree | 198ca5f242c63a205a05fa4cfd6d063277c541fd /server/tests/cli/update-host.ts | |
parent | 83903cb65d531a6b6b91715387493ba8312b264d (diff) | |
download | PeerTube-764b1a14fc494f2cfd7ea590d2f07b01df65c7ad.tar.gz PeerTube-764b1a14fc494f2cfd7ea590d2f07b01df65c7ad.tar.zst PeerTube-764b1a14fc494f2cfd7ea590d2f07b01df65c7ad.zip |
Use random names for VOD HLS playlists
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 | }) |