diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-28 18:04:46 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-28 18:04:55 +0100 |
commit | 09cababd79f9d445aa027c93cdfe823745fa041a (patch) | |
tree | f781d6ba78b5c4ce7220dea55f13b21230f203d6 /server/tests/utils | |
parent | 22b59e8099947605085cf65a440f07f37fce6b65 (diff) | |
download | PeerTube-09cababd79f9d445aa027c93cdfe823745fa041a.tar.gz PeerTube-09cababd79f9d445aa027c93cdfe823745fa041a.tar.zst PeerTube-09cababd79f9d445aa027c93cdfe823745fa041a.zip |
Add stats route
Diffstat (limited to 'server/tests/utils')
-rw-r--r-- | server/tests/utils/server/config.ts | 2 | ||||
-rw-r--r-- | server/tests/utils/server/stats.ts | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/server/tests/utils/server/config.ts b/server/tests/utils/server/config.ts index e5411117a..57f95a603 100644 --- a/server/tests/utils/server/config.ts +++ b/server/tests/utils/server/config.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { makeDeleteRequest, makeGetRequest, makePutBodyRequest } from '../' | 1 | import { makeDeleteRequest, makeGetRequest, makePutBodyRequest } from '../' |
2 | import { CustomConfig } from '../../../../shared/models/config/custom-config.model' | 2 | import { CustomConfig } from '../../../../shared/models/server/custom-config.model' |
3 | 3 | ||
4 | function getConfig (url: string) { | 4 | function getConfig (url: string) { |
5 | const path = '/api/v1/config' | 5 | const path = '/api/v1/config' |
diff --git a/server/tests/utils/server/stats.ts b/server/tests/utils/server/stats.ts new file mode 100644 index 000000000..9cdec6cff --- /dev/null +++ b/server/tests/utils/server/stats.ts | |||
@@ -0,0 +1,17 @@ | |||
1 | import { makeGetRequest } from '../' | ||
2 | |||
3 | function getStats (url: string) { | ||
4 | const path = '/api/v1/server/stats' | ||
5 | |||
6 | return makeGetRequest({ | ||
7 | url, | ||
8 | path, | ||
9 | statusCodeExpected: 200 | ||
10 | }) | ||
11 | } | ||
12 | |||
13 | // --------------------------------------------------------------------------- | ||
14 | |||
15 | export { | ||
16 | getStats | ||
17 | } | ||