From c47c3bcb0a9265d2a414ec96075052f8619d3f21 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 8 Mar 2022 09:18:43 +0100 Subject: [PATCH] Fix multiple servers tests --- server/tests/api/videos/multiple-servers.ts | 2 +- server/tests/shared/checks.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index ecdd36613..854958f80 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts @@ -207,7 +207,7 @@ describe('Test multiple servers', function () { }, { resolution: 720, - size: 788000 + size: 750000 } ], thumbnailfile: 'thumbnail', diff --git a/server/tests/shared/checks.ts b/server/tests/shared/checks.ts index 8c8260088..dcc16d7ea 100644 --- a/server/tests/shared/checks.ts +++ b/server/tests/shared/checks.ts @@ -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')