diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-14 14:57:59 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-14 14:57:59 +0200 |
commit | 4b5384f6e7be62d072d21d8d964951ba572ab10e (patch) | |
tree | 64dbd0c55096435ef804988c4750f717ad140633 /server/tests/utils | |
parent | cfc16a6db88378f83fa3a501170fa0fc5e7d6636 (diff) | |
download | PeerTube-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.ts | 7 |
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 @@ | |||
1 | import { makeGetRequest } from '../' | 1 | import { makeGetRequest } from '../' |
2 | 2 | ||
3 | function getStats (url: string) { | 3 | function 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 | } |