+ expect(videoDetails.trackerUrls[0]).to.include(server.host)
+ expect(videoDetails.streamingPlaylists[0].playlistUrl).to.include(server.host)
+ expect(videoDetails.streamingPlaylists[0].segmentsSha256Url).to.include(server.host)
+ }
+ })
+
+ it('Should have updated video channels url', async function () {
+ const { data, total } = await server.channels.list({ sort: '-name' })
+ expect(total).to.equal(3)
+
+ for (const channel of data) {
+ const { body } = await makeActivityPubGetRequest(server.url, '/video-channels/' + channel.name)
+
+ expect(body.id).to.equal('http://127.0.0.1:9002/video-channels/' + channel.name)
+ }
+ })
+
+ it('Should have updated accounts url', async function () {
+ const body = await server.accounts.list()
+ expect(body.total).to.equal(3)
+
+ for (const account of body.data) {
+ const usernameWithDomain = account.name
+ const { body } = await makeActivityPubGetRequest(server.url, '/accounts/' + usernameWithDomain)
+
+ expect(body.id).to.equal('http://127.0.0.1:9002/accounts/' + usernameWithDomain)
+ }
+ })
+
+ 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')