doubleFollow,
killallServers,
LiveCommand,
+ makeGetRequest,
makeRawRequest,
PeerTubeServer,
sendRTMPStream,
expect(video.privacy.id).to.equal(VideoPrivacy.UNLISTED)
expect(video.nsfw).to.be.true
- await makeRawRequest(server.url + video.thumbnailPath, HttpStatusCode.OK_200)
- await makeRawRequest(server.url + video.previewPath, HttpStatusCode.OK_200)
+ await makeGetRequest({ url: server.url, path: video.thumbnailPath, expectedStatus: HttpStatusCode.OK_200 })
+ await makeGetRequest({ url: server.url, path: video.previewPath, expectedStatus: HttpStatusCode.OK_200 })
}
})
}
const minBitrateLimits = {
- 720: 5000 * 1000,
+ 720: 4800 * 1000,
360: 1000 * 1000,
240: 550 * 1000
}
expect(video.files).to.have.lengthOf(0)
const hlsPlaylist = video.streamingPlaylists.find(s => s.type === VideoStreamingPlaylistType.HLS)
- await makeRawRequest(hlsPlaylist.playlistUrl, HttpStatusCode.OK_200)
- await makeRawRequest(hlsPlaylist.segmentsSha256Url, HttpStatusCode.OK_200)
+ await makeRawRequest({ url: hlsPlaylist.playlistUrl, expectedStatus: HttpStatusCode.OK_200 })
+ await makeRawRequest({ url: hlsPlaylist.segmentsSha256Url, expectedStatus: HttpStatusCode.OK_200 })
// We should have generated random filenames
expect(basename(hlsPlaylist.playlistUrl)).to.not.equal('master.m3u8')
expect(probe.format.bit_rate).to.be.below(maxBitrateLimits[videoStream.height])
expect(probe.format.bit_rate).to.be.at.least(minBitrateLimits[videoStream.height])
- await makeRawRequest(file.torrentUrl, HttpStatusCode.OK_200)
- await makeRawRequest(file.fileUrl, HttpStatusCode.OK_200)
+ await makeRawRequest({ url: file.torrentUrl, expectedStatus: HttpStatusCode.OK_200 })
+ await makeRawRequest({ url: file.fileUrl, expectedStatus: HttpStatusCode.OK_200 })
}
}
})