Fix redundancy tests

This commit is contained in:
Chocobozzz 2018-09-26 10:16:12 +02:00
parent 4a534352ad
commit d82d8ad60c
No known key found for this signature in database
GPG Key ID: 583A612D890159BE

View File

@ -143,19 +143,20 @@ async function check2Webseeds (strategy: VideoRedundancyStrategy, videoUUID?: st
for (const file of video.files) {
checkMagnetWebseeds(file, webseeds, server)
// Only servers 1 and 2 have the video
if (server.serverNumber !== 3) {
await makeGetRequest({
url: server.url,
statusCodeExpected: 200,
path: '/static/webseed/' + `${videoUUID}-${file.resolution.id}.mp4`,
contentType: null
})
}
}
}
}
for (const url of [ 'http://localhost:9001', 'http://localhost:9002' ]) {
await makeGetRequest({
url,
statusCodeExpected: 200,
path: '/static/webseed/' + videoUUID,
contentType: null
})
}
for (const directory of [ 'test1', 'test2' ]) {
const files = await readdir(join(root(), directory, 'videos'))
expect(files).to.have.length.at.least(4)