X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fserver%2Ffollow-constraints.ts;h=455fbc76298c12f9961c7b6b04583c3e82c35d7a;hb=4e56f0fff12ab9840574e7a27277fc78b195b3e2;hp=bd7b215dbdf0a42459195fe102444386639843a2;hpb=c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/server/follow-constraints.ts b/server/tests/api/server/follow-constraints.ts index bd7b215db..455fbc762 100644 --- a/server/tests/api/server/follow-constraints.ts +++ b/server/tests/api/server/follow-constraints.ts @@ -2,9 +2,8 @@ import 'mocha' import * as chai from 'chai' -import { HttpStatusCode } from '@shared/models' -import { cleanupTests, doubleFollow, createMultipleServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' -import { PeerTubeProblemDocument, ServerErrorCode } from '@shared/models' +import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' +import { HttpStatusCode, PeerTubeProblemDocument, ServerErrorCode } from '@shared/models' const expect = chai.expect @@ -15,7 +14,7 @@ describe('Test follow constraints', function () { let userToken: string before(async function () { - this.timeout(90000) + this.timeout(240000) servers = await createMultipleServers(2) @@ -157,7 +156,7 @@ describe('Test follow constraints', function () { it('Should list local account videos', async function () { const { total, data } = await servers[0].videos.listByAccount({ - token: undefined, + token: null, handle: 'root@localhost:' + servers[0].port }) @@ -167,7 +166,7 @@ describe('Test follow constraints', function () { it('Should not list remote account videos', async function () { const { total, data } = await servers[0].videos.listByAccount({ - token: undefined, + token: null, handle: 'root@localhost:' + servers[1].port }) @@ -177,7 +176,7 @@ describe('Test follow constraints', function () { it('Should list local channel videos', async function () { const handle = 'root_channel@localhost:' + servers[0].port - const { total, data } = await servers[0].videos.listByChannel({ token: undefined, handle }) + const { total, data } = await servers[0].videos.listByChannel({ token: null, handle }) expect(total).to.equal(1) expect(data).to.have.lengthOf(1) @@ -185,7 +184,7 @@ describe('Test follow constraints', function () { it('Should not list remote channel videos', async function () { const handle = 'root_channel@localhost:' + servers[1].port - const { total, data } = await servers[0].videos.listByChannel({ token: undefined, handle }) + const { total, data } = await servers[0].videos.listByChannel({ token: null, handle }) expect(total).to.equal(0) expect(data).to.have.lengthOf(0)