diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 09:47:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch) | |
tree | eaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /shared/extra-utils/miscs/checks.ts | |
parent | 89d241a79c262b9775c233b73cff080043ebb5e6 (diff) | |
download | PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip |
Use an object to represent a server
Diffstat (limited to 'shared/extra-utils/miscs/checks.ts')
-rw-r--r-- | shared/extra-utils/miscs/checks.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/extra-utils/miscs/checks.ts b/shared/extra-utils/miscs/checks.ts index 8f7bdb9b5..c81460330 100644 --- a/shared/extra-utils/miscs/checks.ts +++ b/shared/extra-utils/miscs/checks.ts | |||
@@ -6,7 +6,7 @@ import { join } from 'path' | |||
6 | import { root } from '@server/helpers/core-utils' | 6 | import { root } from '@server/helpers/core-utils' |
7 | import { HttpStatusCode } from '@shared/core-utils' | 7 | import { HttpStatusCode } from '@shared/core-utils' |
8 | import { makeGetRequest } from '../requests' | 8 | import { makeGetRequest } from '../requests' |
9 | import { ServerInfo } from '../server' | 9 | import { PeerTubeServer } from '../server' |
10 | 10 | ||
11 | // Default interval -> 5 minutes | 11 | // Default interval -> 5 minutes |
12 | function dateIsValid (dateString: string, interval = 300000) { | 12 | function dateIsValid (dateString: string, interval = 300000) { |
@@ -33,7 +33,7 @@ async function testImage (url: string, imageName: string, imagePath: string, ext | |||
33 | expect(data.length).to.be.below(maxLength, 'the generated image is way larger than the recorded fixture') | 33 | expect(data.length).to.be.below(maxLength, 'the generated image is way larger than the recorded fixture') |
34 | } | 34 | } |
35 | 35 | ||
36 | async function testFileExistsOrNot (server: ServerInfo, directory: string, filePath: string, exist: boolean) { | 36 | async function testFileExistsOrNot (server: PeerTubeServer, directory: string, filePath: string, exist: boolean) { |
37 | const base = server.servers.buildDirectory(directory) | 37 | const base = server.servers.buildDirectory(directory) |
38 | 38 | ||
39 | expect(await pathExists(join(base, filePath))).to.equal(exist) | 39 | expect(await pathExists(join(base, filePath))).to.equal(exist) |