X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fserver%2Freverse-proxy.ts;h=11c96c4b524c755ce0d841a11b2f1f304d794782;hb=b379759f55a35837b803a3b988674972db2903d1;hp=0a1565faff36b0e1cc75d0ac7217cee98e60fdc6;hpb=e771ff815dba3b4a95633f4e1e10dacd222dfe61;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/server/reverse-proxy.ts b/server/tests/api/server/reverse-proxy.ts index 0a1565faf..11c96c4b5 100644 --- a/server/tests/api/server/reverse-proxy.ts +++ b/server/tests/api/server/reverse-proxy.ts @@ -11,7 +11,7 @@ describe('Test application behind a reverse proxy', function () { let videoId: string before(async function () { - this.timeout(30000) + this.timeout(60000) const config = { rates_limit: { @@ -42,7 +42,7 @@ describe('Test application behind a reverse proxy', function () { }) it('Should view a video only once with the same IP by default', async function () { - this.timeout(20000) + this.timeout(40000) await server.views.simulateView({ id: videoId }) await server.views.simulateView({ id: videoId }) @@ -106,13 +106,13 @@ describe('Test application behind a reverse proxy', function () { it('Should rate limit signup', async function () { for (let i = 0; i < 10; i++) { try { - await server.users.register({ username: 'test' + i }) + await server.registrations.register({ username: 'test' + i }) } catch { // empty } } - await server.users.register({ username: 'test42', expectedStatus: HttpStatusCode.TOO_MANY_REQUESTS_429 }) + await server.registrations.register({ username: 'test42', expectedStatus: HttpStatusCode.TOO_MANY_REQUESTS_429 }) }) it('Should not rate limit failed signup', async function () { @@ -121,10 +121,10 @@ describe('Test application behind a reverse proxy', function () { await wait(7000) for (let i = 0; i < 3; i++) { - await server.users.register({ username: 'test' + i, expectedStatus: HttpStatusCode.CONFLICT_409 }) + await server.registrations.register({ username: 'test' + i, expectedStatus: HttpStatusCode.CONFLICT_409 }) } - await server.users.register({ username: 'test43', expectedStatus: HttpStatusCode.NO_CONTENT_204 }) + await server.registrations.register({ username: 'test43', expectedStatus: HttpStatusCode.NO_CONTENT_204 }) })