mirror of https://github.com/Chocobozzz/PeerTube
Fix multiple servers tests
This commit is contained in:
parent
4c6d99e5b6
commit
c47c3bcb0a
|
@ -207,7 +207,7 @@ describe('Test multiple servers', function () {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
resolution: 720,
|
resolution: 720,
|
||||||
size: 788000
|
size: 750000
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
thumbnailfile: 'thumbnail',
|
thumbnailfile: 'thumbnail',
|
||||||
|
|
|
@ -35,8 +35,8 @@ async function testImage (url: string, imageName: string, imageHTTPPath: string,
|
||||||
const body = res.body
|
const body = res.body
|
||||||
|
|
||||||
const data = await readFile(join(root(), 'server', 'tests', 'fixtures', imageName + extension))
|
const data = await readFile(join(root(), 'server', 'tests', 'fixtures', imageName + extension))
|
||||||
const minLength = data.length - ((30 * data.length) / 100)
|
const minLength = data.length - ((40 * data.length) / 100)
|
||||||
const maxLength = data.length + ((30 * data.length) / 100)
|
const maxLength = data.length + ((40 * data.length) / 100)
|
||||||
|
|
||||||
expect(body.length).to.be.above(minLength, 'the generated image is way smaller than the recorded fixture')
|
expect(body.length).to.be.above(minLength, 'the generated image is way smaller than the recorded fixture')
|
||||||
expect(body.length).to.be.below(maxLength, 'the generated image is way larger than the recorded fixture')
|
expect(body.length).to.be.below(maxLength, 'the generated image is way larger than the recorded fixture')
|
||||||
|
|
Loading…
Reference in New Issue