X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Factivitypub%2Fclient.ts;h=34c6be49be9be139a418fa1b54baf16340d4a5ab;hb=8c559fad1e1c4c2ab7f1388c73200aa4c6256d74;hp=edf588c166fbc8d64b953ec680f329670395819a;hpb=97567dd81f508dd6295ac4d73d849aa2ce0a6549;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/activitypub/client.ts b/server/tests/api/activitypub/client.ts index edf588c16..34c6be49b 100644 --- a/server/tests/api/activitypub/client.ts +++ b/server/tests/api/activitypub/client.ts @@ -3,6 +3,7 @@ import * as chai from 'chai' import 'mocha' import { + cleanupTests, doubleFollow, flushAndRunMultipleServers, flushTests, @@ -39,7 +40,7 @@ describe('Test activitypub', function () { const object = res.body expect(object.type).to.equal('Person') - expect(object.id).to.equal('http://localhost:9001/accounts/root') + expect(object.id).to.equal('http://localhost:' + servers[0].port + '/accounts/root') expect(object.name).to.equal('root') expect(object.preferredUsername).to.equal('root') }) @@ -49,17 +50,17 @@ describe('Test activitypub', function () { const object = res.body expect(object.type).to.equal('Video') - expect(object.id).to.equal('http://localhost:9001/videos/watch/' + videoUUID) + expect(object.id).to.equal('http://localhost:' + servers[0].port + '/videos/watch/' + videoUUID) expect(object.name).to.equal('video') }) it('Should redirect to the origin video object', async function () { const res = await makeActivityPubGetRequest(servers[1].url, '/videos/watch/' + videoUUID, 302) - expect(res.header.location).to.equal('http://localhost:9001/videos/watch/' + videoUUID) + expect(res.header.location).to.equal('http://localhost:' + servers[0].port + '/videos/watch/' + videoUUID) }) - after(function () { - killallServers(servers) + after(async function () { + await cleanupTests(servers) }) })