aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/redundancy.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params/redundancy.ts')
-rw-r--r--server/tests/api/check-params/redundancy.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/server/tests/api/check-params/redundancy.ts b/server/tests/api/check-params/redundancy.ts
index 8f930fbbc..6471da840 100644
--- a/server/tests/api/check-params/redundancy.ts
+++ b/server/tests/api/check-params/redundancy.ts
@@ -3,6 +3,7 @@
3import 'mocha' 3import 'mocha'
4 4
5import { 5import {
6 cleanupTests,
6 createUser, 7 createUser,
7 doubleFollow, 8 doubleFollow,
8 flushAndRunMultipleServers, 9 flushAndRunMultipleServers,
@@ -43,7 +44,7 @@ describe('Test server redundancy API validators', function () {
43 it('Should fail with an invalid token', async function () { 44 it('Should fail with an invalid token', async function () {
44 await makePutBodyRequest({ 45 await makePutBodyRequest({
45 url: servers[0].url, 46 url: servers[0].url,
46 path: path + '/localhost:9002', 47 path: path + '/localhost:' + servers[1].port,
47 fields: { redundancyAllowed: true }, 48 fields: { redundancyAllowed: true },
48 token: 'fake_token', 49 token: 'fake_token',
49 statusCodeExpected: 401 50 statusCodeExpected: 401
@@ -53,7 +54,7 @@ describe('Test server redundancy API validators', function () {
53 it('Should fail if the user is not an administrator', async function () { 54 it('Should fail if the user is not an administrator', async function () {
54 await makePutBodyRequest({ 55 await makePutBodyRequest({
55 url: servers[0].url, 56 url: servers[0].url,
56 path: path + '/localhost:9002', 57 path: path + '/localhost:' + servers[1].port,
57 fields: { redundancyAllowed: true }, 58 fields: { redundancyAllowed: true },
58 token: userAccessToken, 59 token: userAccessToken,
59 statusCodeExpected: 403 60 statusCodeExpected: 403
@@ -73,7 +74,7 @@ describe('Test server redundancy API validators', function () {
73 it('Should fail without de redundancyAllowed param', async function () { 74 it('Should fail without de redundancyAllowed param', async function () {
74 await makePutBodyRequest({ 75 await makePutBodyRequest({
75 url: servers[0].url, 76 url: servers[0].url,
76 path: path + '/localhost:9002', 77 path: path + '/localhost:' + servers[1].port,
77 fields: { blabla: true }, 78 fields: { blabla: true },
78 token: servers[0].accessToken, 79 token: servers[0].accessToken,
79 statusCodeExpected: 400 80 statusCodeExpected: 400
@@ -83,7 +84,7 @@ describe('Test server redundancy API validators', function () {
83 it('Should succeed with the correct parameters', async function () { 84 it('Should succeed with the correct parameters', async function () {
84 await makePutBodyRequest({ 85 await makePutBodyRequest({
85 url: servers[0].url, 86 url: servers[0].url,
86 path: path + '/localhost:9002', 87 path: path + '/localhost:' + servers[1].port,
87 fields: { redundancyAllowed: true }, 88 fields: { redundancyAllowed: true },
88 token: servers[0].accessToken, 89 token: servers[0].accessToken,
89 statusCodeExpected: 204 90 statusCodeExpected: 204
@@ -91,7 +92,7 @@ describe('Test server redundancy API validators', function () {
91 }) 92 })
92 }) 93 })
93 94
94 after(function () { 95 after(async function () {
95 killallServers(servers) 96 await cleanupTests(servers)
96 }) 97 })
97}) 98})