diff options
author | Chocobozzz <me@florianbigard.com> | 2022-03-08 09:18:43 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-03-08 09:18:43 +0100 |
commit | c47c3bcb0a9265d2a414ec96075052f8619d3f21 (patch) | |
tree | 0445880c36ae793a26a3106740f96b4bd9b67eff /server/tests | |
parent | 4c6d99e5b69b29e19d53ede14414b76beef815e2 (diff) | |
download | PeerTube-c47c3bcb0a9265d2a414ec96075052f8619d3f21.tar.gz PeerTube-c47c3bcb0a9265d2a414ec96075052f8619d3f21.tar.zst PeerTube-c47c3bcb0a9265d2a414ec96075052f8619d3f21.zip |
Fix multiple servers tests
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/videos/multiple-servers.ts | 2 | ||||
-rw-r--r-- | 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 () { | |||
207 | }, | 207 | }, |
208 | { | 208 | { |
209 | resolution: 720, | 209 | resolution: 720, |
210 | size: 788000 | 210 | size: 750000 |
211 | } | 211 | } |
212 | ], | 212 | ], |
213 | thumbnailfile: 'thumbnail', | 213 | 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, | |||
35 | const body = res.body | 35 | const body = res.body |
36 | 36 | ||
37 | const data = await readFile(join(root(), 'server', 'tests', 'fixtures', imageName + extension)) | 37 | const data = await readFile(join(root(), 'server', 'tests', 'fixtures', imageName + extension)) |
38 | const minLength = data.length - ((30 * data.length) / 100) | 38 | const minLength = data.length - ((40 * data.length) / 100) |
39 | const maxLength = data.length + ((30 * data.length) / 100) | 39 | const maxLength = data.length + ((40 * data.length) / 100) |
40 | 40 | ||
41 | expect(body.length).to.be.above(minLength, 'the generated image is way smaller than the recorded fixture') | 41 | expect(body.length).to.be.above(minLength, 'the generated image is way smaller than the recorded fixture') |
42 | expect(body.length).to.be.below(maxLength, 'the generated image is way larger than the recorded fixture') | 42 | expect(body.length).to.be.below(maxLength, 'the generated image is way larger than the recorded fixture') |