X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Factivitypub%2Ffetch.ts;h=3d54c20428e1de58d47a80d1c1bf31f6f938a3c8;hb=2284f202070aa2e49156cc52b3b1596a7d5aadec;hp=7240bb0fb494ebac59ddb0eabb8d413b2d927cab;hpb=210feb6cc484a6c5c63c98f770de34e223f944cb;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/activitypub/fetch.ts b/server/tests/api/activitypub/fetch.ts index 7240bb0fb..3d54c2042 100644 --- a/server/tests/api/activitypub/fetch.ts +++ b/server/tests/api/activitypub/fetch.ts @@ -3,6 +3,7 @@ import 'mocha' import { + cleanupTests, closeAllSequelize, createUser, doubleFollow, @@ -48,8 +49,16 @@ describe('Test ActivityPub fetcher', function () { const badVideoUUID = res.body.video.uuid await uploadVideo(servers[0].url, userAccessToken, { name: 'video user' }) - await setActorField(1, 'http://localhost:9001/accounts/user1', 'url', 'http://localhost:9002/accounts/user1') - await setVideoField(1, badVideoUUID, 'url', 'http://localhost:9003/videos/watch/' + badVideoUUID) + { + const to = 'http://localhost:' + servers[0].port + '/accounts/user1' + const value = 'http://localhost:' + servers[1].port + '/accounts/user1' + await setActorField(servers[0].internalServerNumber, to, 'url', value) + } + + { + const value = 'http://localhost:' + servers[2].port + '/videos/watch/' + badVideoUUID + await setVideoField(servers[0].internalServerNumber, badVideoUUID, 'url', value) + } }) it('Should add only the video with a valid actor URL', async function () { @@ -78,7 +87,9 @@ describe('Test ActivityPub fetcher', function () { }) after(async function () { - killallServers(servers) + this.timeout(20000) + + await cleanupTests(servers) await closeAllSequelize(servers) })