+
+ it('Should have updated torrent hosts', async function () {
+ this.timeout(30000)
+
+ const { data } = await server.videos.list()
+ expect(data).to.have.lengthOf(2)
+
+ for (const video of data) {
+ const videoDetails = await server.videos.get({ id: video.id })
+ const files = getAllFiles(videoDetails)
+
+ expect(files).to.have.lengthOf(8)
+
+ for (const file of files) {
+ expect(file.magnetUri).to.contain('127.0.0.1%3A9002%2Ftracker%2Fsocket')
+ expect(file.magnetUri).to.contain('127.0.0.1%3A9002%2Fstatic%2F')
+
+ const torrent = await parseTorrentVideo(server, file)
+ const announceWS = torrent.announce.find(a => a === 'ws://127.0.0.1:9002/tracker/socket')
+ expect(announceWS).to.not.be.undefined
+
+ const announceHttp = torrent.announce.find(a => a === 'http://127.0.0.1:9002/tracker/announce')
+ expect(announceHttp).to.not.be.undefined
+
+ expect(torrent.urlList[0]).to.contain('http://127.0.0.1:9002/static/')
+ }
+ }
+ })
+
+ after(async function () {
+ await cleanupTests([ server ])
+ })