aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-29 11:59:29 +0200
committerChocobozzz <me@florianbigard.com>2019-07-29 13:40:39 +0200
commit2284f202070aa2e49156cc52b3b1596a7d5aadec (patch)
tree77aeb00016734667f8ff32a98ea8b4a6ed3ca31e /shared/extra-utils/server
parent112be80ebdf96ef6a27420c1c6a10097388731a9 (diff)
downloadPeerTube-2284f202070aa2e49156cc52b3b1596a7d5aadec.tar.gz
PeerTube-2284f202070aa2e49156cc52b3b1596a7d5aadec.tar.zst
PeerTube-2284f202070aa2e49156cc52b3b1596a7d5aadec.zip
Add gitlab ci support
Diffstat (limited to 'shared/extra-utils/server')
-rw-r--r--shared/extra-utils/server/jobs.ts5
-rw-r--r--shared/extra-utils/server/servers.ts4
2 files changed, 6 insertions, 3 deletions
diff --git a/shared/extra-utils/server/jobs.ts b/shared/extra-utils/server/jobs.ts
index 692b5e24d..11b570f60 100644
--- a/shared/extra-utils/server/jobs.ts
+++ b/shared/extra-utils/server/jobs.ts
@@ -2,6 +2,7 @@ import * as request from 'supertest'
2import { Job, JobState } from '../../models' 2import { Job, JobState } from '../../models'
3import { wait } from '../miscs/miscs' 3import { wait } from '../miscs/miscs'
4import { ServerInfo } from './servers' 4import { ServerInfo } from './servers'
5import { inspect } from 'util'
5 6
6function getJobsList (url: string, accessToken: string, state: JobState) { 7function getJobsList (url: string, accessToken: string, state: JobState) {
7 const path = '/api/v1/jobs/' + state 8 const path = '/api/v1/jobs/' + state
@@ -49,7 +50,9 @@ async function waitJobs (serversArg: ServerInfo[] | ServerInfo) {
49 .then(res => res.body.data) 50 .then(res => res.body.data)
50 .then((jobs: Job[]) => jobs.filter(j => j.type !== 'videos-views')) 51 .then((jobs: Job[]) => jobs.filter(j => j.type !== 'videos-views'))
51 .then(jobs => { 52 .then(jobs => {
52 if (jobs.length !== 0) pendingRequests = true 53 if (jobs.length !== 0) {
54 pendingRequests = true
55 }
53 }) 56 })
54 tasks.push(p) 57 tasks.push(p)
55 } 58 }
diff --git a/shared/extra-utils/server/servers.ts b/shared/extra-utils/server/servers.ts
index 40cf7f0f3..a0720d778 100644
--- a/shared/extra-utils/server/servers.ts
+++ b/shared/extra-utils/server/servers.ts
@@ -79,8 +79,8 @@ function flushTests (serverNumber?: number) {
79 return new Promise<void>((res, rej) => { 79 return new Promise<void>((res, rej) => {
80 const suffix = serverNumber ? ` -- ${serverNumber}` : '' 80 const suffix = serverNumber ? ` -- ${serverNumber}` : ''
81 81
82 return exec('npm run clean:server:test' + suffix, err => { 82 return exec('npm run clean:server:test' + suffix, (err, _stdout, stderr) => {
83 if (err) return rej(err) 83 if (err || stderr) return rej(err || new Error(stderr))
84 84
85 return res() 85 return res()
86 }) 86 })