}
function uploadVideo (url: string, accessToken: string, videoAttributesArg: VideoAttributes, specialStatus = 204) {
- const path = '/api/v1/videos'
+ const path = '/api/v1/videos/upload'
// Default attributes
let attributes = {
.expect(specialStatus)
}
-function parseTorrentVideo (server: ServerInfo, videoUUID: string) {
+function parseTorrentVideo (server: ServerInfo, videoUUID: string, resolutionLabel: string) {
return new Promise<any>((res, rej) => {
- const torrentPath = join(__dirname, '..', '..', '..', 'test' + server.serverNumber, 'torrents', videoUUID + '.torrent')
+ const torrentName = videoUUID + '-' + resolutionLabel + '.torrent'
+ const torrentPath = join(__dirname, '..', '..', '..', 'test' + server.serverNumber, 'torrents', torrentName)
readFile(torrentPath, (err, data) => {
if (err) return rej(err)