Fix multiple servers tests

pull/4846/head
Chocobozzz 2022-03-08 09:18:43 +01:00
parent 4c6d99e5b6
commit c47c3bcb0a
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 3 additions and 3 deletions

View File

@ -207,7 +207,7 @@ describe('Test multiple servers', function () {
},
{
resolution: 720,
size: 788000
size: 750000
}
],
thumbnailfile: 'thumbnail',

View File

@ -35,8 +35,8 @@ async function testImage (url: string, imageName: string, imageHTTPPath: string,
const body = res.body
const data = await readFile(join(root(), 'server', 'tests', 'fixtures', imageName + extension))
const minLength = data.length - ((30 * data.length) / 100)
const maxLength = data.length + ((30 * data.length) / 100)
const minLength = data.length - ((40 * 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.below(maxLength, 'the generated image is way larger than the recorded fixture')