aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/activitypub/fetch.ts2
-rw-r--r--server/tests/api/ci-1.sh (renamed from server/tests/api/travis-1.sh)2
-rw-r--r--server/tests/api/ci-2.sh (renamed from server/tests/api/travis-2.sh)2
-rw-r--r--server/tests/api/ci-3.sh (renamed from server/tests/api/travis-3.sh)2
-rw-r--r--server/tests/api/ci-4.sh (renamed from server/tests/api/travis-4.sh)2
-rw-r--r--server/tests/api/notifications/user-notifications.ts4
-rw-r--r--server/tests/api/server/email.ts2
-rw-r--r--server/tests/api/server/handle-down.ts2
-rw-r--r--server/tests/api/server/jobs.ts3
-rw-r--r--server/tests/api/videos/video-schedule-update.ts2
10 files changed, 12 insertions, 11 deletions
diff --git a/server/tests/api/activitypub/fetch.ts b/server/tests/api/activitypub/fetch.ts
index 3a1c0d321..3d54c2042 100644
--- a/server/tests/api/activitypub/fetch.ts
+++ b/server/tests/api/activitypub/fetch.ts
@@ -87,7 +87,7 @@ describe('Test ActivityPub fetcher', function () {
87 }) 87 })
88 88
89 after(async function () { 89 after(async function () {
90 this.timeout(10000) 90 this.timeout(20000)
91 91
92 await cleanupTests(servers) 92 await cleanupTests(servers)
93 93
diff --git a/server/tests/api/travis-1.sh b/server/tests/api/ci-1.sh
index db4021b25..8dd9756a5 100644
--- a/server/tests/api/travis-1.sh
+++ b/server/tests/api/ci-1.sh
@@ -6,5 +6,5 @@ checkParamFiles=$(find server/tests/api/check-params -type f | grep -v index.ts
6notificationsFiles=$(find server/tests/api/notifications -type f | grep -v index.ts | xargs echo) 6notificationsFiles=$(find server/tests/api/notifications -type f | grep -v index.ts | xargs echo)
7searchFiles=$(find server/tests/api/search -type f | grep -v index.ts | xargs echo) 7searchFiles=$(find server/tests/api/search -type f | grep -v index.ts | xargs echo)
8 8
9MOCHA_PARALLEL=true mocha --timeout 5000 --exit --require ts-node/register --bail \ 9MOCHA_PARALLEL=true npm run mocha --timeout 30000 --exit --require ts-node/register --bail \
10 $notificationsFiles $searchFiles $checkParamFiles 10 $notificationsFiles $searchFiles $checkParamFiles
diff --git a/server/tests/api/travis-2.sh b/server/tests/api/ci-2.sh
index ba7a061b0..16ab585e9 100644
--- a/server/tests/api/travis-2.sh
+++ b/server/tests/api/ci-2.sh
@@ -5,5 +5,5 @@ set -eu
5serverFiles=$(find server/tests/api/server -type f | grep -v index.ts | xargs echo) 5serverFiles=$(find server/tests/api/server -type f | grep -v index.ts | xargs echo)
6usersFiles=$(find server/tests/api/users -type f | grep -v index.ts | xargs echo) 6usersFiles=$(find server/tests/api/users -type f | grep -v index.ts | xargs echo)
7 7
8MOCHA_PARALLEL=true mocha --timeout 5000 --exit --require ts-node/register --bail \ 8MOCHA_PARALLEL=true npm run mocha-parallel-tests -- --max-parallel $1 --timeout 30000 --exit --require ts-node/register --bail \
9 $serverFiles $usersFiles 9 $serverFiles $usersFiles
diff --git a/server/tests/api/travis-3.sh b/server/tests/api/ci-3.sh
index 82457222c..fc96f6fb4 100644
--- a/server/tests/api/travis-3.sh
+++ b/server/tests/api/ci-3.sh
@@ -4,5 +4,5 @@ set -eu
4 4
5videosFiles=$(find server/tests/api/videos -type f | grep -v index.ts | xargs echo) 5videosFiles=$(find server/tests/api/videos -type f | grep -v index.ts | xargs echo)
6 6
7MOCHA_PARALLEL=true mocha --timeout 5000 --exit --require ts-node/register --bail \ 7MOCHA_PARALLEL=true npm run mocha --timeout 30000 --exit --require ts-node/register --bail \
8 $videosFiles 8 $videosFiles
diff --git a/server/tests/api/travis-4.sh b/server/tests/api/ci-4.sh
index 875986182..74809e1ad 100644
--- a/server/tests/api/travis-4.sh
+++ b/server/tests/api/ci-4.sh
@@ -5,5 +5,5 @@ set -eu
5redundancyFiles=$(find server/tests/api/redundancy -type f | grep -v index.ts | xargs echo) 5redundancyFiles=$(find server/tests/api/redundancy -type f | grep -v index.ts | xargs echo)
6activitypubFiles=$(find server/tests/api/activitypub -type f | grep -v index.ts | xargs echo) 6activitypubFiles=$(find server/tests/api/activitypub -type f | grep -v index.ts | xargs echo)
7 7
8MOCHA_PARALLEL=true mocha-parallel-tests --max-parallel $1 --timeout 5000 --exit --require ts-node/register --bail \ 8MOCHA_PARALLEL=true npm run mocha-parallel-tests -- --max-parallel $1 --timeout 30000 --exit --require ts-node/register --bail \
9 $redundancyFiles $activitypubFiles 9 $redundancyFiles $activitypubFiles
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index 662b64e05..6fa630562 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -782,7 +782,7 @@ describe('Test users notifications', function () {
782 it('Should not send a notification before the video is published', async function () { 782 it('Should not send a notification before the video is published', async function () {
783 this.timeout(20000) 783 this.timeout(20000)
784 784
785 let updateAt = new Date(new Date().getTime() + 100000) 785 let updateAt = new Date(new Date().getTime() + 1000000)
786 786
787 const data = { 787 const data = {
788 privacy: VideoPrivacy.PRIVATE, 788 privacy: VideoPrivacy.PRIVATE,
@@ -1074,7 +1074,7 @@ describe('Test users notifications', function () {
1074 it('Should send unblacklist but not published/subscription notes after unblacklisted if scheduled update pending', async function () { 1074 it('Should send unblacklist but not published/subscription notes after unblacklisted if scheduled update pending', async function () {
1075 this.timeout(20000) 1075 this.timeout(20000)
1076 1076
1077 let updateAt = new Date(new Date().getTime() + 100000) 1077 let updateAt = new Date(new Date().getTime() + 1000000)
1078 1078
1079 const name = 'video with auto-blacklist and future schedule ' + uuidv4() 1079 const name = 'video with auto-blacklist and future schedule ' + uuidv4()
1080 1080
diff --git a/server/tests/api/server/email.ts b/server/tests/api/server/email.ts
index 7b7acfd12..c55a221f2 100644
--- a/server/tests/api/server/email.ts
+++ b/server/tests/api/server/email.ts
@@ -40,7 +40,7 @@ describe('Test emails', function () {
40 let emailPort: number 40 let emailPort: number
41 41
42 before(async function () { 42 before(async function () {
43 this.timeout(30000) 43 this.timeout(50000)
44 44
45 emailPort = await MockSmtpServer.Instance.collectEmails(emails) 45 emailPort = await MockSmtpServer.Instance.collectEmails(emails)
46 46
diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.ts
index 068654d8c..a225443c5 100644
--- a/server/tests/api/server/handle-down.ts
+++ b/server/tests/api/server/handle-down.ts
@@ -109,7 +109,7 @@ describe('Test handle downs', function () {
109 }) 109 })
110 110
111 it('Should remove followers that are often down', async function () { 111 it('Should remove followers that are often down', async function () {
112 this.timeout(60000) 112 this.timeout(240000)
113 113
114 // Server 2 and 3 follow server 1 114 // Server 2 and 3 follow server 1
115 await follow(servers[1].url, [ servers[0].url ], servers[1].accessToken) 115 await follow(servers[1].url, [ servers[0].url ], servers[1].accessToken)
diff --git a/server/tests/api/server/jobs.ts b/server/tests/api/server/jobs.ts
index 3ab2fe120..ceea47a85 100644
--- a/server/tests/api/server/jobs.ts
+++ b/server/tests/api/server/jobs.ts
@@ -8,6 +8,7 @@ import { getJobsList, getJobsListPaginationAndSort, waitJobs } from '../../../..
8import { flushAndRunMultipleServers } from '../../../../shared/extra-utils/server/servers' 8import { flushAndRunMultipleServers } from '../../../../shared/extra-utils/server/servers'
9import { uploadVideo } from '../../../../shared/extra-utils/videos/videos' 9import { uploadVideo } from '../../../../shared/extra-utils/videos/videos'
10import { dateIsValid } from '../../../../shared/extra-utils/miscs/miscs' 10import { dateIsValid } from '../../../../shared/extra-utils/miscs/miscs'
11import { Job } from '../../../../shared/models/server'
11 12
12const expect = chai.expect 13const expect = chai.expect
13 14
@@ -50,7 +51,7 @@ describe('Test jobs', function () {
50 if (job.type === 'videos-views') job = res.body.data[1] 51 if (job.type === 'videos-views') job = res.body.data[1]
51 52
52 expect(job.state).to.equal('completed') 53 expect(job.state).to.equal('completed')
53 expect(job.type).to.equal('activitypub-follow') 54 expect(job.type.startsWith('activitypub-')).to.be.true
54 expect(dateIsValid(job.createdAt)).to.be.true 55 expect(dateIsValid(job.createdAt)).to.be.true
55 expect(dateIsValid(job.processedOn)).to.be.true 56 expect(dateIsValid(job.processedOn)).to.be.true
56 expect(dateIsValid(job.finishedOn)).to.be.true 57 expect(dateIsValid(job.finishedOn)).to.be.true
diff --git a/server/tests/api/videos/video-schedule-update.ts b/server/tests/api/videos/video-schedule-update.ts
index 64f657780..65a8eafb8 100644
--- a/server/tests/api/videos/video-schedule-update.ts
+++ b/server/tests/api/videos/video-schedule-update.ts
@@ -85,7 +85,7 @@ describe('Test video update scheduler', function () {
85 }) 85 })
86 86
87 it('Should wait some seconds and have the video in public privacy', async function () { 87 it('Should wait some seconds and have the video in public privacy', async function () {
88 this.timeout(20000) 88 this.timeout(50000)
89 89
90 await wait(15000) 90 await wait(15000)
91 await waitJobs(servers) 91 await waitJobs(servers)