X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fredundancy.ts;h=908407b9a5a898a1e5ce823072373f467037eb29;hb=2732eeff9e6994582293b5aaa0cb158b7e272e9e;hp=f45860e02959f060ac445cf1aebf8760ec355530;hpb=c7c5f8d0f17b0ab598fbe237f11639c6de28110c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/redundancy.ts b/server/tests/api/check-params/redundancy.ts index f45860e02..908407b9a 100644 --- a/server/tests/api/check-params/redundancy.ts +++ b/server/tests/api/check-params/redundancy.ts @@ -186,7 +186,7 @@ describe('Test server redundancy API validators', function () { it('Should fail with an invalid token', async function () { await makePutBodyRequest({ url: servers[0].url, - path: path + '/localhost:' + servers[1].port, + path: path + '/' + servers[1].host, fields: { redundancyAllowed: true }, token: 'fake_token', expectedStatus: HttpStatusCode.UNAUTHORIZED_401 @@ -196,7 +196,7 @@ describe('Test server redundancy API validators', function () { it('Should fail if the user is not an administrator', async function () { await makePutBodyRequest({ url: servers[0].url, - path: path + '/localhost:' + servers[1].port, + path: path + '/' + servers[1].host, fields: { redundancyAllowed: true }, token: userAccessToken, expectedStatus: HttpStatusCode.FORBIDDEN_403 @@ -216,7 +216,7 @@ describe('Test server redundancy API validators', function () { it('Should fail without de redundancyAllowed param', async function () { await makePutBodyRequest({ url: servers[0].url, - path: path + '/localhost:' + servers[1].port, + path: path + '/' + servers[1].host, fields: { blabla: true }, token: servers[0].accessToken, expectedStatus: HttpStatusCode.BAD_REQUEST_400 @@ -226,7 +226,7 @@ describe('Test server redundancy API validators', function () { it('Should succeed with the correct parameters', async function () { await makePutBodyRequest({ url: servers[0].url, - path: path + '/localhost:' + servers[1].port, + path: path + '/' + servers[1].host, fields: { redundancyAllowed: true }, token: servers[0].accessToken, expectedStatus: HttpStatusCode.NO_CONTENT_204