aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-28 18:04:46 +0100
committerChocobozzz <me@florianbigard.com>2018-02-28 18:04:55 +0100
commit09cababd79f9d445aa027c93cdfe823745fa041a (patch)
treef781d6ba78b5c4ce7220dea55f13b21230f203d6 /server/tests/utils
parent22b59e8099947605085cf65a440f07f37fce6b65 (diff)
downloadPeerTube-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.ts2
-rw-r--r--server/tests/utils/server/stats.ts17
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 @@
1import { makeDeleteRequest, makeGetRequest, makePutBodyRequest } from '../' 1import { makeDeleteRequest, makeGetRequest, makePutBodyRequest } from '../'
2import { CustomConfig } from '../../../../shared/models/config/custom-config.model' 2import { CustomConfig } from '../../../../shared/models/server/custom-config.model'
3 3
4function getConfig (url: string) { 4function 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 @@
1import { makeGetRequest } from '../'
2
3function 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
15export {
16 getStats
17}