aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-14 14:57:59 +0200
committerChocobozzz <me@florianbigard.com>2018-09-14 14:57:59 +0200
commit4b5384f6e7be62d072d21d8d964951ba572ab10e (patch)
tree64dbd0c55096435ef804988c4750f717ad140633 /server/tests/utils
parentcfc16a6db88378f83fa3a501170fa0fc5e7d6636 (diff)
downloadPeerTube-4b5384f6e7be62d072d21d8d964951ba572ab10e.tar.gz
PeerTube-4b5384f6e7be62d072d21d8d964951ba572ab10e.tar.zst
PeerTube-4b5384f6e7be62d072d21d8d964951ba572ab10e.zip
Add redundancy stats
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/server/stats.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/tests/utils/server/stats.ts b/server/tests/utils/server/stats.ts
index 9cdec6cff..01989d952 100644
--- a/server/tests/utils/server/stats.ts
+++ b/server/tests/utils/server/stats.ts
@@ -1,11 +1,16 @@
1import { makeGetRequest } from '../' 1import { makeGetRequest } from '../'
2 2
3function getStats (url: string) { 3function getStats (url: string, useCache = false) {
4 const path = '/api/v1/server/stats' 4 const path = '/api/v1/server/stats'
5 5
6 const query = {
7 t: useCache ? undefined : new Date().getTime()
8 }
9
6 return makeGetRequest({ 10 return makeGetRequest({
7 url, 11 url,
8 path, 12 path,
13 query,
9 statusCodeExpected: 200 14 statusCodeExpected: 200
10 }) 15 })
11} 16}