aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/request-schedulers.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-09-08 17:10:57 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-09-08 17:11:32 +0200
commit096641566f2663076c3b0d5a1947ecb7efb29fc0 (patch)
tree44ab2dc5848966d3597269ed565d4cc9ba2fc6f2 /server/tests/api/request-schedulers.ts
parente95561cdf195d2926e1856ed285c2b86960bc86f (diff)
downloadPeerTube-096641566f2663076c3b0d5a1947ecb7efb29fc0.tar.gz
PeerTube-096641566f2663076c3b0d5a1947ecb7efb29fc0.tar.zst
PeerTube-096641566f2663076c3b0d5a1947ecb7efb29fc0.zip
Convert real world script to typescript
Diffstat (limited to 'server/tests/api/request-schedulers.ts')
-rw-r--r--server/tests/api/request-schedulers.ts14
1 files changed, 4 insertions, 10 deletions
diff --git a/server/tests/api/request-schedulers.ts b/server/tests/api/request-schedulers.ts
index 2358ed8f7..326ed3468 100644
--- a/server/tests/api/request-schedulers.ts
+++ b/server/tests/api/request-schedulers.ts
@@ -12,7 +12,9 @@ import {
12 makeFriends, 12 makeFriends,
13 wait, 13 wait,
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 flushAndRunMultipleServers 15 flushAndRunMultipleServers,
16 getRequestsStats,
17 killallServers
16} from '../utils' 18} from '../utils'
17 19
18describe('Test requests schedulers stats', function () { 20describe('Test requests schedulers stats', function () {
@@ -28,14 +30,6 @@ describe('Test requests schedulers stats', function () {
28 return uploadVideo(server.url, server.accessToken, videoAttributes) 30 return uploadVideo(server.url, server.accessToken, videoAttributes)
29 } 31 }
30 32
31 function getRequestsStats (server: ServerInfo) {
32 return request(server.url)
33 .get(path)
34 .set('Accept', 'application/json')
35 .set('Authorization', 'Bearer ' + server.accessToken)
36 .expect(200)
37 }
38
39 // --------------------------------------------------------------- 33 // ---------------------------------------------------------------
40 34
41 before(async function () { 35 before(async function () {
@@ -80,7 +74,7 @@ describe('Test requests schedulers stats', function () {
80 }) 74 })
81 75
82 after(async function () { 76 after(async function () {
83 process.kill(-servers[0].app.pid) 77 killallServers(servers)
84 78
85 if (this['ok']) { 79 if (this['ok']) {
86 await flushTests() 80 await flushTests()