X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Factivitypub.ts;h=53a04d3638d8ede6de29e13da4965386eda1af70;hb=d82d8ad60c467958412dd6bfb3e8119a3f533a37;hp=333e02e8468d9cfa1c060f6f0282f57033256e74;hpb=6cbdbdef1786aabb2003918fad6cd8c0d4433f7c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/activitypub.ts b/server/tests/activitypub.ts index 333e02e84..53a04d363 100644 --- a/server/tests/activitypub.ts +++ b/server/tests/activitypub.ts @@ -2,9 +2,7 @@ import * as chai from 'chai' import 'mocha' -import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from './utils' -import { runServer } from './utils/servers' -import { makeActivityPubGetRequest } from './utils/activitypub' +import { flushTests, killallServers, makeActivityPubGetRequest, runServer, ServerInfo, setAccessTokensToServers } from './utils' const expect = chai.expect @@ -12,7 +10,7 @@ describe('Test activitypub', function () { let server: ServerInfo = null before(async function () { - this.timeout(10000) + this.timeout(30000) await flushTests() @@ -22,21 +20,16 @@ describe('Test activitypub', function () { }) it('Should return the account object', async function () { - const res = await makeActivityPubGetRequest(server.url, '/account/root') + const res = await makeActivityPubGetRequest(server.url, '/accounts/root') const object = res.body expect(object.type).to.equal('Person') - expect(object.id).to.equal('http://localhost:9001/account/root') + expect(object.id).to.equal('http://localhost:9001/accounts/root') expect(object.name).to.equal('root') expect(object.preferredUsername).to.equal('root') }) after(async function () { killallServers([ server ]) - - // Keep the logs if the test failed - if (this['ok']) { - await flushTests() - } }) })