aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/activitypub/fetch.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-26 08:50:52 +0200
committerChocobozzz <me@florianbigard.com>2019-05-15 15:14:21 +0200
commit48f07b4a4091cb10dc4d179118e155f3a118dca8 (patch)
tree8fcc6bd8cafa636ebaf97a083fafbcc0d52ad5cd /server/tests/api/activitypub/fetch.ts
parent7243f84db0f34c6d5610a54603b0cce7c284a7b3 (diff)
downloadPeerTube-48f07b4a4091cb10dc4d179118e155f3a118dca8.tar.gz
PeerTube-48f07b4a4091cb10dc4d179118e155f3a118dca8.tar.zst
PeerTube-48f07b4a4091cb10dc4d179118e155f3a118dca8.zip
All API tests in parallel
Diffstat (limited to 'server/tests/api/activitypub/fetch.ts')
-rw-r--r--server/tests/api/activitypub/fetch.ts17
1 files changed, 14 insertions, 3 deletions
diff --git a/server/tests/api/activitypub/fetch.ts b/server/tests/api/activitypub/fetch.ts
index 7240bb0fb..3a1c0d321 100644
--- a/server/tests/api/activitypub/fetch.ts
+++ b/server/tests/api/activitypub/fetch.ts
@@ -3,6 +3,7 @@
3import 'mocha' 3import 'mocha'
4 4
5import { 5import {
6 cleanupTests,
6 closeAllSequelize, 7 closeAllSequelize,
7 createUser, 8 createUser,
8 doubleFollow, 9 doubleFollow,
@@ -48,8 +49,16 @@ describe('Test ActivityPub fetcher', function () {
48 const badVideoUUID = res.body.video.uuid 49 const badVideoUUID = res.body.video.uuid
49 await uploadVideo(servers[0].url, userAccessToken, { name: 'video user' }) 50 await uploadVideo(servers[0].url, userAccessToken, { name: 'video user' })
50 51
51 await setActorField(1, 'http://localhost:9001/accounts/user1', 'url', 'http://localhost:9002/accounts/user1') 52 {
52 await setVideoField(1, badVideoUUID, 'url', 'http://localhost:9003/videos/watch/' + badVideoUUID) 53 const to = 'http://localhost:' + servers[0].port + '/accounts/user1'
54 const value = 'http://localhost:' + servers[1].port + '/accounts/user1'
55 await setActorField(servers[0].internalServerNumber, to, 'url', value)
56 }
57
58 {
59 const value = 'http://localhost:' + servers[2].port + '/videos/watch/' + badVideoUUID
60 await setVideoField(servers[0].internalServerNumber, badVideoUUID, 'url', value)
61 }
53 }) 62 })
54 63
55 it('Should add only the video with a valid actor URL', async function () { 64 it('Should add only the video with a valid actor URL', async function () {
@@ -78,7 +87,9 @@ describe('Test ActivityPub fetcher', function () {
78 }) 87 })
79 88
80 after(async function () { 89 after(async function () {
81 killallServers(servers) 90 this.timeout(10000)
91
92 await cleanupTests(servers)
82 93
83 await closeAllSequelize(servers) 94 await closeAllSequelize(servers)
84 }) 95 })