diff options
Diffstat (limited to 'server/tests/api/check-params/blocklist.ts')
-rw-r--r-- | server/tests/api/check-params/blocklist.ts | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/server/tests/api/check-params/blocklist.ts b/server/tests/api/check-params/blocklist.ts index f745b9088..169b591a3 100644 --- a/server/tests/api/check-params/blocklist.ts +++ b/server/tests/api/check-params/blocklist.ts | |||
@@ -163,7 +163,7 @@ describe('Test blocklist API validators', function () { | |||
163 | await makePostBodyRequest({ | 163 | await makePostBodyRequest({ |
164 | url: server.url, | 164 | url: server.url, |
165 | path, | 165 | path, |
166 | fields: { host: 'localhost:9002' }, | 166 | fields: { host: '127.0.0.1:9002' }, |
167 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 | 167 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 |
168 | }) | 168 | }) |
169 | }) | 169 | }) |
@@ -173,7 +173,7 @@ describe('Test blocklist API validators', function () { | |||
173 | url: server.url, | 173 | url: server.url, |
174 | token: server.accessToken, | 174 | token: server.accessToken, |
175 | path, | 175 | path, |
176 | fields: { host: 'localhost:9003' }, | 176 | fields: { host: '127.0.0.1:9003' }, |
177 | expectedStatus: HttpStatusCode.NO_CONTENT_204 | 177 | expectedStatus: HttpStatusCode.NO_CONTENT_204 |
178 | }) | 178 | }) |
179 | }) | 179 | }) |
@@ -183,7 +183,7 @@ describe('Test blocklist API validators', function () { | |||
183 | url: server.url, | 183 | url: server.url, |
184 | token: server.accessToken, | 184 | token: server.accessToken, |
185 | path, | 185 | path, |
186 | fields: { host: 'localhost:' + server.port }, | 186 | fields: { host: server.host }, |
187 | expectedStatus: HttpStatusCode.CONFLICT_409 | 187 | expectedStatus: HttpStatusCode.CONFLICT_409 |
188 | }) | 188 | }) |
189 | }) | 189 | }) |
@@ -193,7 +193,7 @@ describe('Test blocklist API validators', function () { | |||
193 | url: server.url, | 193 | url: server.url, |
194 | token: server.accessToken, | 194 | token: server.accessToken, |
195 | path, | 195 | path, |
196 | fields: { host: 'localhost:' + servers[1].port }, | 196 | fields: { host: servers[1].host }, |
197 | expectedStatus: HttpStatusCode.NO_CONTENT_204 | 197 | expectedStatus: HttpStatusCode.NO_CONTENT_204 |
198 | }) | 198 | }) |
199 | }) | 199 | }) |
@@ -203,7 +203,7 @@ describe('Test blocklist API validators', function () { | |||
203 | it('Should fail with an unauthenticated user', async function () { | 203 | it('Should fail with an unauthenticated user', async function () { |
204 | await makeDeleteRequest({ | 204 | await makeDeleteRequest({ |
205 | url: server.url, | 205 | url: server.url, |
206 | path: path + '/localhost:' + servers[1].port, | 206 | path: path + '/' + servers[1].host, |
207 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 | 207 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 |
208 | }) | 208 | }) |
209 | }) | 209 | }) |
@@ -211,7 +211,7 @@ describe('Test blocklist API validators', function () { | |||
211 | it('Should fail with an unknown server block', async function () { | 211 | it('Should fail with an unknown server block', async function () { |
212 | await makeDeleteRequest({ | 212 | await makeDeleteRequest({ |
213 | url: server.url, | 213 | url: server.url, |
214 | path: path + '/localhost:9004', | 214 | path: path + '/127.0.0.1:9004', |
215 | token: server.accessToken, | 215 | token: server.accessToken, |
216 | expectedStatus: HttpStatusCode.NOT_FOUND_404 | 216 | expectedStatus: HttpStatusCode.NOT_FOUND_404 |
217 | }) | 217 | }) |
@@ -220,7 +220,7 @@ describe('Test blocklist API validators', function () { | |||
220 | it('Should succeed with the correct params', async function () { | 220 | it('Should succeed with the correct params', async function () { |
221 | await makeDeleteRequest({ | 221 | await makeDeleteRequest({ |
222 | url: server.url, | 222 | url: server.url, |
223 | path: path + '/localhost:' + servers[1].port, | 223 | path: path + '/' + servers[1].host, |
224 | token: server.accessToken, | 224 | token: server.accessToken, |
225 | expectedStatus: HttpStatusCode.NO_CONTENT_204 | 225 | expectedStatus: HttpStatusCode.NO_CONTENT_204 |
226 | }) | 226 | }) |
@@ -393,7 +393,7 @@ describe('Test blocklist API validators', function () { | |||
393 | await makePostBodyRequest({ | 393 | await makePostBodyRequest({ |
394 | url: server.url, | 394 | url: server.url, |
395 | path, | 395 | path, |
396 | fields: { host: 'localhost:' + servers[1].port }, | 396 | fields: { host: servers[1].host }, |
397 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 | 397 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 |
398 | }) | 398 | }) |
399 | }) | 399 | }) |
@@ -403,7 +403,7 @@ describe('Test blocklist API validators', function () { | |||
403 | url: server.url, | 403 | url: server.url, |
404 | token: userAccessToken, | 404 | token: userAccessToken, |
405 | path, | 405 | path, |
406 | fields: { host: 'localhost:' + servers[1].port }, | 406 | fields: { host: servers[1].host }, |
407 | expectedStatus: HttpStatusCode.FORBIDDEN_403 | 407 | expectedStatus: HttpStatusCode.FORBIDDEN_403 |
408 | }) | 408 | }) |
409 | }) | 409 | }) |
@@ -413,7 +413,7 @@ describe('Test blocklist API validators', function () { | |||
413 | url: server.url, | 413 | url: server.url, |
414 | token: server.accessToken, | 414 | token: server.accessToken, |
415 | path, | 415 | path, |
416 | fields: { host: 'localhost:9003' }, | 416 | fields: { host: '127.0.0.1:9003' }, |
417 | expectedStatus: HttpStatusCode.NO_CONTENT_204 | 417 | expectedStatus: HttpStatusCode.NO_CONTENT_204 |
418 | }) | 418 | }) |
419 | }) | 419 | }) |
@@ -423,7 +423,7 @@ describe('Test blocklist API validators', function () { | |||
423 | url: server.url, | 423 | url: server.url, |
424 | token: server.accessToken, | 424 | token: server.accessToken, |
425 | path, | 425 | path, |
426 | fields: { host: 'localhost:' + server.port }, | 426 | fields: { host: server.host }, |
427 | expectedStatus: HttpStatusCode.CONFLICT_409 | 427 | expectedStatus: HttpStatusCode.CONFLICT_409 |
428 | }) | 428 | }) |
429 | }) | 429 | }) |
@@ -433,7 +433,7 @@ describe('Test blocklist API validators', function () { | |||
433 | url: server.url, | 433 | url: server.url, |
434 | token: server.accessToken, | 434 | token: server.accessToken, |
435 | path, | 435 | path, |
436 | fields: { host: 'localhost:' + servers[1].port }, | 436 | fields: { host: servers[1].host }, |
437 | expectedStatus: HttpStatusCode.NO_CONTENT_204 | 437 | expectedStatus: HttpStatusCode.NO_CONTENT_204 |
438 | }) | 438 | }) |
439 | }) | 439 | }) |
@@ -443,7 +443,7 @@ describe('Test blocklist API validators', function () { | |||
443 | it('Should fail with an unauthenticated user', async function () { | 443 | it('Should fail with an unauthenticated user', async function () { |
444 | await makeDeleteRequest({ | 444 | await makeDeleteRequest({ |
445 | url: server.url, | 445 | url: server.url, |
446 | path: path + '/localhost:' + servers[1].port, | 446 | path: path + '/' + servers[1].host, |
447 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 | 447 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 |
448 | }) | 448 | }) |
449 | }) | 449 | }) |
@@ -451,7 +451,7 @@ describe('Test blocklist API validators', function () { | |||
451 | it('Should fail with a user without the appropriate rights', async function () { | 451 | it('Should fail with a user without the appropriate rights', async function () { |
452 | await makeDeleteRequest({ | 452 | await makeDeleteRequest({ |
453 | url: server.url, | 453 | url: server.url, |
454 | path: path + '/localhost:' + servers[1].port, | 454 | path: path + '/' + servers[1].host, |
455 | token: userAccessToken, | 455 | token: userAccessToken, |
456 | expectedStatus: HttpStatusCode.FORBIDDEN_403 | 456 | expectedStatus: HttpStatusCode.FORBIDDEN_403 |
457 | }) | 457 | }) |
@@ -460,7 +460,7 @@ describe('Test blocklist API validators', function () { | |||
460 | it('Should fail with an unknown server block', async function () { | 460 | it('Should fail with an unknown server block', async function () { |
461 | await makeDeleteRequest({ | 461 | await makeDeleteRequest({ |
462 | url: server.url, | 462 | url: server.url, |
463 | path: path + '/localhost:9004', | 463 | path: path + '/127.0.0.1:9004', |
464 | token: server.accessToken, | 464 | token: server.accessToken, |
465 | expectedStatus: HttpStatusCode.NOT_FOUND_404 | 465 | expectedStatus: HttpStatusCode.NOT_FOUND_404 |
466 | }) | 466 | }) |
@@ -469,7 +469,7 @@ describe('Test blocklist API validators', function () { | |||
469 | it('Should succeed with the correct params', async function () { | 469 | it('Should succeed with the correct params', async function () { |
470 | await makeDeleteRequest({ | 470 | await makeDeleteRequest({ |
471 | url: server.url, | 471 | url: server.url, |
472 | path: path + '/localhost:' + servers[1].port, | 472 | path: path + '/' + servers[1].host, |
473 | token: server.accessToken, | 473 | token: server.accessToken, |
474 | expectedStatus: HttpStatusCode.NO_CONTENT_204 | 474 | expectedStatus: HttpStatusCode.NO_CONTENT_204 |
475 | }) | 475 | }) |