aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-20 16:24:31 +0200
committerGitHub <noreply@github.com>2018-09-20 16:24:31 +0200
commit0491173a61aed66205c017e0d7e0503ea316c144 (patch)
treece6621597505f9518cfdf0981977d097c63f9fad /server/tests/utils
parent8704acf49efc770d73bf07c10468ed8c74d28a83 (diff)
parent6247b2057b792cea155a1abd9788c363ae7d2cc2 (diff)
downloadPeerTube-0491173a61aed66205c017e0d7e0503ea316c144.tar.gz
PeerTube-0491173a61aed66205c017e0d7e0503ea316c144.tar.zst
PeerTube-0491173a61aed66205c017e0d7e0503ea316c144.zip
Merge branch 'develop' into cli-wrapper
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/server/servers.ts7
-rw-r--r--server/tests/utils/server/stats.ts7
2 files changed, 8 insertions, 6 deletions
diff --git a/server/tests/utils/server/servers.ts b/server/tests/utils/server/servers.ts
index 1372c03c3..26ab4e1bb 100644
--- a/server/tests/utils/server/servers.ts
+++ b/server/tests/utils/server/servers.ts
@@ -35,7 +35,7 @@ interface ServerInfo {
35 } 35 }
36} 36}
37 37
38function flushAndRunMultipleServers (totalServers) { 38function flushAndRunMultipleServers (totalServers: number, configOverride?: Object) {
39 let apps = [] 39 let apps = []
40 let i = 0 40 let i = 0
41 41
@@ -51,10 +51,7 @@ function flushAndRunMultipleServers (totalServers) {
51 flushTests() 51 flushTests()
52 .then(() => { 52 .then(() => {
53 for (let j = 1; j <= totalServers; j++) { 53 for (let j = 1; j <= totalServers; j++) {
54 // For the virtual buffer 54 runServer(j, configOverride).then(app => anotherServerDone(j, app))
55 setTimeout(() => {
56 runServer(j).then(app => anotherServerDone(j, app))
57 }, 1000 * (j - 1))
58 } 55 }
59 }) 56 })
60 }) 57 })
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}