X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fcli%2Fupdate-host.ts;h=4358f28e303914842da63b314893d19d1375eaa6;hb=7ae71355c40e9065f83d3fc77b6750d1929ac201;hp=7e1d3f658d54b9b6283f86d6765652fe223197c3;hpb=14d3270f363245d2c83fcc2ac109e39743b5627e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts index 7e1d3f658..4358f28e3 100644 --- a/server/tests/cli/update-host.ts +++ b/server/tests/cli/update-host.ts @@ -13,7 +13,8 @@ import { ServerInfo, setAccessTokensToServers, uploadVideo, - wait + wait, + getVideo } from '../utils' describe('Test update host scripts', function () { @@ -55,13 +56,16 @@ describe('Test update host scripts', function () { expect(videos).to.have.lengthOf(2) for (const video of videos) { - expect(video.files).to.have.lengthOf(4) + const res2 = await getVideo(server.url, video.id) + const videoDetails = res2.body - for (const file of video.files) { + expect(videoDetails.files).to.have.lengthOf(4) + + for (const file of videoDetails.files) { expect(file.magnetUri).to.contain('localhost%3A9002%2Ftracker%2Fsocket') expect(file.magnetUri).to.contain('localhost%3A9002%2Fstatic%2Fwebseed%2F') - const torrent = await parseTorrentVideo(server, video.uuid, file.resolution) + const torrent = await parseTorrentVideo(server, videoDetails.uuid, file.resolution) expect(torrent.announce[0]).to.equal('ws://localhost:9002/tracker/socket') expect(torrent.urlList[0]).to.contain('http://localhost:9002/static/webseed') }