aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-25 09:46:02 +0200
committerChocobozzz <me@florianbigard.com>2019-05-14 15:37:42 +0200
commitda3a3ab6829107b3ed7f18dda42648dfde41871d (patch)
tree0440ec299637afa27b7c965a36ae61a2b8ddb03e
parent56ba489f67474b176ddbba2f5f6247df583c868a (diff)
downloadPeerTube-da3a3ab6829107b3ed7f18dda42648dfde41871d.tar.gz
PeerTube-da3a3ab6829107b3ed7f18dda42648dfde41871d.tar.zst
PeerTube-da3a3ab6829107b3ed7f18dda42648dfde41871d.zip
Try parallel check params tests
-rw-r--r--package.json1
-rwxr-xr-xscripts/travis.sh2
-rw-r--r--server/tests/api/index-1.ts3
-rw-r--r--server/tests/api/notifications/index.ts2
-rw-r--r--server/tests/api/search/search-activitypub-video-channels.ts2
-rw-r--r--server/tests/api/search/search-activitypub-videos.ts2
-rw-r--r--server/tests/api/search/search-videos.ts2
-rw-r--r--server/tests/api/travis-1.sh10
-rw-r--r--yarn.lock77
9 files changed, 92 insertions, 9 deletions
diff --git a/package.json b/package.json
index 1dbf33a0a..6f789c5bf 100644
--- a/package.json
+++ b/package.json
@@ -205,6 +205,7 @@
205 "maildev": "^1.0.0-rc3", 205 "maildev": "^1.0.0-rc3",
206 "marked-man": "^0.4.2", 206 "marked-man": "^0.4.2",
207 "mocha": "^6.0.0", 207 "mocha": "^6.0.0",
208 "mocha-parallel-tests": "^2.1.0",
208 "nodemon": "^1.18.6", 209 "nodemon": "^1.18.6",
209 "sass-lint": "^1.12.1", 210 "sass-lint": "^1.12.1",
210 "source-map-support": "^0.5.0", 211 "source-map-support": "^0.5.0",
diff --git a/scripts/travis.sh b/scripts/travis.sh
index 3557816c8..67d8b5d7e 100755
--- a/scripts/travis.sh
+++ b/scripts/travis.sh
@@ -20,7 +20,7 @@ elif [ "$1" = "cli" ]; then
20 mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/cli/index.ts 20 mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/cli/index.ts
21elif [ "$1" = "api-1" ]; then 21elif [ "$1" = "api-1" ]; then
22 npm run build:server 22 npm run build:server
23 mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/api/index-1.ts 23 sh ./server/tests/api/travis-1.sh
24elif [ "$1" = "api-2" ]; then 24elif [ "$1" = "api-2" ]; then
25 npm run build:server 25 npm run build:server
26 mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/api/index-2.ts 26 mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/api/index-2.ts
diff --git a/server/tests/api/index-1.ts b/server/tests/api/index-1.ts
deleted file mode 100644
index 75cdd9025..000000000
--- a/server/tests/api/index-1.ts
+++ /dev/null
@@ -1,3 +0,0 @@
1import './check-params'
2import './notifications'
3import './search'
diff --git a/server/tests/api/notifications/index.ts b/server/tests/api/notifications/index.ts
index 95ac8fc51..b573f850e 100644
--- a/server/tests/api/notifications/index.ts
+++ b/server/tests/api/notifications/index.ts
@@ -1 +1 @@
export * from './user-notifications' import './user-notifications'
diff --git a/server/tests/api/search/search-activitypub-video-channels.ts b/server/tests/api/search/search-activitypub-video-channels.ts
index 4d1ceb767..70a077ffc 100644
--- a/server/tests/api/search/search-activitypub-video-channels.ts
+++ b/server/tests/api/search/search-activitypub-video-channels.ts
@@ -24,7 +24,7 @@ import { searchVideoChannel } from '../../../../shared/extra-utils/search/video-
24 24
25const expect = chai.expect 25const expect = chai.expect
26 26
27describe('Test a ActivityPub video channels search', function () { 27describe('Test ActivityPub video channels search', function () {
28 let servers: ServerInfo[] 28 let servers: ServerInfo[]
29 let userServer2Token: string 29 let userServer2Token: string
30 let videoServer2UUID: string 30 let videoServer2UUID: string
diff --git a/server/tests/api/search/search-activitypub-videos.ts b/server/tests/api/search/search-activitypub-videos.ts
index e039961cb..e8e2b5a64 100644
--- a/server/tests/api/search/search-activitypub-videos.ts
+++ b/server/tests/api/search/search-activitypub-videos.ts
@@ -22,7 +22,7 @@ import { Video, VideoPrivacy } from '../../../../shared/models/videos'
22 22
23const expect = chai.expect 23const expect = chai.expect
24 24
25describe('Test a ActivityPub videos search', function () { 25describe('Test ActivityPub videos search', function () {
26 let servers: ServerInfo[] 26 let servers: ServerInfo[]
27 let videoServer1UUID: string 27 let videoServer1UUID: string
28 let videoServer2UUID: string 28 let videoServer2UUID: string
diff --git a/server/tests/api/search/search-videos.ts b/server/tests/api/search/search-videos.ts
index 1a086b33a..22d3a5951 100644
--- a/server/tests/api/search/search-videos.ts
+++ b/server/tests/api/search/search-videos.ts
@@ -18,7 +18,7 @@ import {
18 18
19const expect = chai.expect 19const expect = chai.expect
20 20
21describe('Test a videos search', function () { 21describe('Test videos search', function () {
22 let server: ServerInfo = null 22 let server: ServerInfo = null
23 let startDate: string 23 let startDate: string
24 24
diff --git a/server/tests/api/travis-1.sh b/server/tests/api/travis-1.sh
new file mode 100644
index 000000000..e4761d2f9
--- /dev/null
+++ b/server/tests/api/travis-1.sh
@@ -0,0 +1,10 @@
1#!/usr/bin/env sh
2
3set -eu
4
5files=$(find server/tests/api/check-params -type f | grep -v index.ts | xargs echo)
6
7MOCHA_PARALLEL=true mocha-parallel-tests --max-parallel 4 --timeout 5000 --exit --require ts-node/register --bail $files
8
9mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/api/notifications/index.ts
10mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/api/search/index.ts
diff --git a/yarn.lock b/yarn.lock
index f2cc0ee05..f2dc8a9ec 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -515,6 +515,11 @@ ansi-regex@^3.0.0:
515 resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 515 resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
516 integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= 516 integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
517 517
518ansi-regex@^4.1.0:
519 version "4.1.0"
520 resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
521 integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
522
518ansi-styles@^2.2.1: 523ansi-styles@^2.2.1:
519 version "2.2.1" 524 version "2.2.1"
520 resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 525 resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
@@ -1446,6 +1451,11 @@ circular-json@^0.3.1:
1446 resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" 1451 resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66"
1447 integrity sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A== 1452 integrity sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==
1448 1453
1454circular-json@^0.5.9:
1455 version "0.5.9"
1456 resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.5.9.tgz#932763ae88f4f7dead7a0d09c8a51a4743a53b1d"
1457 integrity sha512-4ivwqHpIFJZBuhN3g/pEcdbnGUywkBblloGbkglyloVjjR3uT6tieI89MVOfbP2tHX5sgb01FuLgAOzebNlJNQ==
1458
1449class-utils@^0.3.5: 1459class-utils@^0.3.5:
1450 version "0.3.6" 1460 version "0.3.6"
1451 resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" 1461 resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
@@ -2322,6 +2332,11 @@ elliptic@=3.0.3:
2322 hash.js "^1.0.0" 2332 hash.js "^1.0.0"
2323 inherits "^2.0.1" 2333 inherits "^2.0.1"
2324 2334
2335emoji-regex@^7.0.1:
2336 version "7.0.3"
2337 resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
2338 integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
2339
2325enabled@1.0.x: 2340enabled@1.0.x:
2326 version "1.0.2" 2341 version "1.0.2"
2327 resolved "https://registry.yarnpkg.com/enabled/-/enabled-1.0.2.tgz#965f6513d2c2d1c5f4652b64a2e3396467fc2f93" 2342 resolved "https://registry.yarnpkg.com/enabled/-/enabled-1.0.2.tgz#965f6513d2c2d1c5f4652b64a2e3396467fc2f93"
@@ -3304,6 +3319,11 @@ get-caller-file@^1.0.1:
3304 resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" 3319 resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
3305 integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== 3320 integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==
3306 3321
3322get-caller-file@^2.0.1:
3323 version "2.0.5"
3324 resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
3325 integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
3326
3307get-func-name@^2.0.0: 3327get-func-name@^2.0.0:
3308 version "2.0.0" 3328 version "2.0.0"
3309 resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" 3329 resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
@@ -5322,6 +5342,15 @@ mkdirp@0.5.1, mkdirp@0.x.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdi
5322 dependencies: 5342 dependencies:
5323 minimist "0.0.8" 5343 minimist "0.0.8"
5324 5344
5345mocha-parallel-tests@^2.1.0:
5346 version "2.1.0"
5347 resolved "https://registry.yarnpkg.com/mocha-parallel-tests/-/mocha-parallel-tests-2.1.0.tgz#94ab823b619b129fc347472f97c18595f0870c0e"
5348 integrity sha512-NElZRp6T7kpis0mSkviPTwgIU13kkvazmmPPFLl/UqBeJoEjMj9tKz47qMV9kB0txURLoA1Rd/yDYqG1hlsKoA==
5349 dependencies:
5350 circular-json "^0.5.9"
5351 debug "^4.1.1"
5352 yargs "^13.2.2"
5353
5325mocha@^6.0.0: 5354mocha@^6.0.0:
5326 version "6.0.2" 5355 version "6.0.2"
5327 resolved "https://registry.yarnpkg.com/mocha/-/mocha-6.0.2.tgz#cdc1a6fdf66472c079b5605bac59d29807702d2c" 5356 resolved "https://registry.yarnpkg.com/mocha/-/mocha-6.0.2.tgz#cdc1a6fdf66472c079b5605bac59d29807702d2c"
@@ -6170,7 +6199,7 @@ os-locale@^2.0.0:
6170 lcid "^1.0.0" 6199 lcid "^1.0.0"
6171 mem "^1.1.0" 6200 mem "^1.1.0"
6172 6201
6173os-locale@^3.0.0: 6202os-locale@^3.0.0, os-locale@^3.1.0:
6174 version "3.1.0" 6203 version "3.1.0"
6175 resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" 6204 resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a"
6176 integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== 6205 integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==
@@ -7171,6 +7200,11 @@ require-main-filename@^1.0.1:
7171 resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" 7200 resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
7172 integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= 7201 integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=
7173 7202
7203require-main-filename@^2.0.0:
7204 version "2.0.0"
7205 resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
7206 integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
7207
7174require-uncached@^1.0.2: 7208require-uncached@^1.0.2:
7175 version "1.0.3" 7209 version "1.0.3"
7176 resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" 7210 resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3"
@@ -8136,6 +8170,15 @@ string-width@^1.0.1:
8136 is-fullwidth-code-point "^2.0.0" 8170 is-fullwidth-code-point "^2.0.0"
8137 strip-ansi "^4.0.0" 8171 strip-ansi "^4.0.0"
8138 8172
8173string-width@^3.0.0:
8174 version "3.1.0"
8175 resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
8176 integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
8177 dependencies:
8178 emoji-regex "^7.0.1"
8179 is-fullwidth-code-point "^2.0.0"
8180 strip-ansi "^5.1.0"
8181
8139string2compact@^1.1.1, string2compact@^1.2.5: 8182string2compact@^1.1.1, string2compact@^1.2.5:
8140 version "1.3.0" 8183 version "1.3.0"
8141 resolved "https://registry.yarnpkg.com/string2compact/-/string2compact-1.3.0.tgz#22d946127b082d1203c51316af60117a337423c3" 8184 resolved "https://registry.yarnpkg.com/string2compact/-/string2compact-1.3.0.tgz#22d946127b082d1203c51316af60117a337423c3"
@@ -8191,6 +8234,13 @@ strip-ansi@^4.0.0:
8191 dependencies: 8234 dependencies:
8192 ansi-regex "^3.0.0" 8235 ansi-regex "^3.0.0"
8193 8236
8237strip-ansi@^5.1.0:
8238 version "5.2.0"
8239 resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
8240 integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
8241 dependencies:
8242 ansi-regex "^4.1.0"
8243
8194strip-eof@^1.0.0: 8244strip-eof@^1.0.0:
8195 version "1.0.0" 8245 version "1.0.0"
8196 resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" 8246 resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
@@ -9315,6 +9365,14 @@ yargs-parser@11.1.1, yargs-parser@^11.1.1:
9315 camelcase "^5.0.0" 9365 camelcase "^5.0.0"
9316 decamelize "^1.2.0" 9366 decamelize "^1.2.0"
9317 9367
9368yargs-parser@^13.0.0:
9369 version "13.0.0"
9370 resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.0.0.tgz#3fc44f3e76a8bdb1cc3602e860108602e5ccde8b"
9371 integrity sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==
9372 dependencies:
9373 camelcase "^5.0.0"
9374 decamelize "^1.2.0"
9375
9318yargs-parser@^8.0.0: 9376yargs-parser@^8.0.0:
9319 version "8.1.0" 9377 version "8.1.0"
9320 resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" 9378 resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950"
@@ -9374,6 +9432,23 @@ yargs@^11.0.0:
9374 y18n "^3.2.1" 9432 y18n "^3.2.1"
9375 yargs-parser "^9.0.2" 9433 yargs-parser "^9.0.2"
9376 9434
9435yargs@^13.2.2:
9436 version "13.2.2"
9437 resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.2.tgz#0c101f580ae95cea7f39d927e7770e3fdc97f993"
9438 integrity sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==
9439 dependencies:
9440 cliui "^4.0.0"
9441 find-up "^3.0.0"
9442 get-caller-file "^2.0.1"
9443 os-locale "^3.1.0"
9444 require-directory "^2.1.1"
9445 require-main-filename "^2.0.0"
9446 set-blocking "^2.0.0"
9447 string-width "^3.0.0"
9448 which-module "^2.0.0"
9449 y18n "^4.0.0"
9450 yargs-parser "^13.0.0"
9451
9377yeast@0.1.2: 9452yeast@0.1.2:
9378 version "0.1.2" 9453 version "0.1.2"
9379 resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" 9454 resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"