diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-18 14:44:12 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-02-19 09:36:50 +0100 |
commit | fae6e4da8f516a9d6c3bad9bf6f35811ccacbad8 (patch) | |
tree | 38df5942cb2fa6e5860c8e0e19471eb6b124e291 /shared/extra-utils/server/debug.ts | |
parent | 3f8ae0e4e4da90c964597e4b3e0724da5eaa1668 (diff) | |
download | PeerTube-fae6e4da8f516a9d6c3bad9bf6f35811ccacbad8.tar.gz PeerTube-fae6e4da8f516a9d6c3bad9bf6f35811ccacbad8.tar.zst PeerTube-fae6e4da8f516a9d6c3bad9bf6f35811ccacbad8.zip |
Try to speed up server tests
Diffstat (limited to 'shared/extra-utils/server/debug.ts')
-rw-r--r-- | shared/extra-utils/server/debug.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/shared/extra-utils/server/debug.ts b/shared/extra-utils/server/debug.ts new file mode 100644 index 000000000..5cf80a5fb --- /dev/null +++ b/shared/extra-utils/server/debug.ts | |||
@@ -0,0 +1,19 @@ | |||
1 | import { makeGetRequest } from '../requests/requests' | ||
2 | import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes' | ||
3 | |||
4 | function getDebug (url: string, token: string) { | ||
5 | const path = '/api/v1/server/debug' | ||
6 | |||
7 | return makeGetRequest({ | ||
8 | url, | ||
9 | path, | ||
10 | token, | ||
11 | statusCodeExpected: HttpStatusCode.OK_200 | ||
12 | }) | ||
13 | } | ||
14 | |||
15 | // --------------------------------------------------------------------------- | ||
16 | |||
17 | export { | ||
18 | getDebug | ||
19 | } | ||