diff options
author | Chocobozzz <me@florianbigard.com> | 2022-12-09 11:14:47 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-12-12 13:36:23 +0100 |
commit | 2732eeff9e6994582293b5aaa0cb158b7e272e9e (patch) | |
tree | 417d30cf470cd1db84e06c5dbd1b5429d4b99bc1 /server/tests/api/check-params/follows.ts | |
parent | c7c5f8d0f17b0ab598fbe237f11639c6de28110c (diff) | |
download | PeerTube-2732eeff9e6994582293b5aaa0cb158b7e272e9e.tar.gz PeerTube-2732eeff9e6994582293b5aaa0cb158b7e272e9e.tar.zst PeerTube-2732eeff9e6994582293b5aaa0cb158b7e272e9e.zip |
Fix CI using 127.0.0.1 for tests
Diffstat (limited to 'server/tests/api/check-params/follows.ts')
-rw-r--r-- | server/tests/api/check-params/follows.ts | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/server/tests/api/check-params/follows.ts b/server/tests/api/check-params/follows.ts index 56e9f8d96..3c911dcee 100644 --- a/server/tests/api/check-params/follows.ts +++ b/server/tests/api/check-params/follows.ts | |||
@@ -48,7 +48,7 @@ describe('Test server follows API validators', function () { | |||
48 | await makePostBodyRequest({ | 48 | await makePostBodyRequest({ |
49 | url: server.url, | 49 | url: server.url, |
50 | path, | 50 | path, |
51 | fields: { hosts: [ 'localhost:9002', 'localhost:coucou' ] }, | 51 | fields: { hosts: [ '127.0.0.1:9002', '127.0.0.1:coucou' ] }, |
52 | token: server.accessToken, | 52 | token: server.accessToken, |
53 | expectedStatus: HttpStatusCode.BAD_REQUEST_400 | 53 | expectedStatus: HttpStatusCode.BAD_REQUEST_400 |
54 | }) | 54 | }) |
@@ -58,7 +58,7 @@ describe('Test server follows API validators', function () { | |||
58 | await makePostBodyRequest({ | 58 | await makePostBodyRequest({ |
59 | url: server.url, | 59 | url: server.url, |
60 | path, | 60 | path, |
61 | fields: { hosts: [ 'localhost:9002', 'http://localhost:9003' ] }, | 61 | fields: { hosts: [ '127.0.0.1:9002', 'http://127.0.0.1:9003' ] }, |
62 | token: server.accessToken, | 62 | token: server.accessToken, |
63 | expectedStatus: HttpStatusCode.BAD_REQUEST_400 | 63 | expectedStatus: HttpStatusCode.BAD_REQUEST_400 |
64 | }) | 64 | }) |
@@ -68,7 +68,7 @@ describe('Test server follows API validators', function () { | |||
68 | await makePostBodyRequest({ | 68 | await makePostBodyRequest({ |
69 | url: server.url, | 69 | url: server.url, |
70 | path, | 70 | path, |
71 | fields: { urls: [ 'localhost:9002', 'localhost:9002' ] }, | 71 | fields: { urls: [ '127.0.0.1:9002', '127.0.0.1:9002' ] }, |
72 | token: server.accessToken, | 72 | token: server.accessToken, |
73 | expectedStatus: HttpStatusCode.BAD_REQUEST_400 | 73 | expectedStatus: HttpStatusCode.BAD_REQUEST_400 |
74 | }) | 74 | }) |
@@ -78,7 +78,7 @@ describe('Test server follows API validators', function () { | |||
78 | await makePostBodyRequest({ | 78 | await makePostBodyRequest({ |
79 | url: server.url, | 79 | url: server.url, |
80 | path, | 80 | path, |
81 | fields: { handles: [ 'hello@example.com', 'localhost:9001' ] }, | 81 | fields: { handles: [ 'hello@example.com', '127.0.0.1:9001' ] }, |
82 | token: server.accessToken, | 82 | token: server.accessToken, |
83 | expectedStatus: HttpStatusCode.BAD_REQUEST_400 | 83 | expectedStatus: HttpStatusCode.BAD_REQUEST_400 |
84 | }) | 84 | }) |
@@ -98,7 +98,7 @@ describe('Test server follows API validators', function () { | |||
98 | await makePostBodyRequest({ | 98 | await makePostBodyRequest({ |
99 | url: server.url, | 99 | url: server.url, |
100 | path, | 100 | path, |
101 | fields: { hosts: [ 'localhost:9002' ] }, | 101 | fields: { hosts: [ '127.0.0.1:9002' ] }, |
102 | token: 'fake_token', | 102 | token: 'fake_token', |
103 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 | 103 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 |
104 | }) | 104 | }) |
@@ -108,7 +108,7 @@ describe('Test server follows API validators', function () { | |||
108 | await makePostBodyRequest({ | 108 | await makePostBodyRequest({ |
109 | url: server.url, | 109 | url: server.url, |
110 | path, | 110 | path, |
111 | fields: { hosts: [ 'localhost:9002' ] }, | 111 | fields: { hosts: [ '127.0.0.1:9002' ] }, |
112 | token: userAccessToken, | 112 | token: userAccessToken, |
113 | expectedStatus: HttpStatusCode.FORBIDDEN_403 | 113 | expectedStatus: HttpStatusCode.FORBIDDEN_403 |
114 | }) | 114 | }) |
@@ -217,7 +217,7 @@ describe('Test server follows API validators', function () { | |||
217 | it('Should fail with an invalid token', async function () { | 217 | it('Should fail with an invalid token', async function () { |
218 | await makeDeleteRequest({ | 218 | await makeDeleteRequest({ |
219 | url: server.url, | 219 | url: server.url, |
220 | path: path + '/toto@localhost:9002', | 220 | path: path + '/toto@127.0.0.1:9002', |
221 | token: 'fake_token', | 221 | token: 'fake_token', |
222 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 | 222 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 |
223 | }) | 223 | }) |
@@ -226,7 +226,7 @@ describe('Test server follows API validators', function () { | |||
226 | it('Should fail if the user is not an administrator', async function () { | 226 | it('Should fail if the user is not an administrator', async function () { |
227 | await makeDeleteRequest({ | 227 | await makeDeleteRequest({ |
228 | url: server.url, | 228 | url: server.url, |
229 | path: path + '/toto@localhost:9002', | 229 | path: path + '/toto@127.0.0.1:9002', |
230 | token: userAccessToken, | 230 | token: userAccessToken, |
231 | expectedStatus: HttpStatusCode.FORBIDDEN_403 | 231 | expectedStatus: HttpStatusCode.FORBIDDEN_403 |
232 | }) | 232 | }) |
@@ -244,7 +244,7 @@ describe('Test server follows API validators', function () { | |||
244 | it('Should fail with an unknown follower', async function () { | 244 | it('Should fail with an unknown follower', async function () { |
245 | await makeDeleteRequest({ | 245 | await makeDeleteRequest({ |
246 | url: server.url, | 246 | url: server.url, |
247 | path: path + '/toto@localhost:9003', | 247 | path: path + '/toto@127.0.0.1:9003', |
248 | token: server.accessToken, | 248 | token: server.accessToken, |
249 | expectedStatus: HttpStatusCode.NOT_FOUND_404 | 249 | expectedStatus: HttpStatusCode.NOT_FOUND_404 |
250 | }) | 250 | }) |
@@ -257,7 +257,7 @@ describe('Test server follows API validators', function () { | |||
257 | it('Should fail with an invalid token', async function () { | 257 | it('Should fail with an invalid token', async function () { |
258 | await makePostBodyRequest({ | 258 | await makePostBodyRequest({ |
259 | url: server.url, | 259 | url: server.url, |
260 | path: path + '/toto@localhost:9002/accept', | 260 | path: path + '/toto@127.0.0.1:9002/accept', |
261 | token: 'fake_token', | 261 | token: 'fake_token', |
262 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 | 262 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 |
263 | }) | 263 | }) |
@@ -266,7 +266,7 @@ describe('Test server follows API validators', function () { | |||
266 | it('Should fail if the user is not an administrator', async function () { | 266 | it('Should fail if the user is not an administrator', async function () { |
267 | await makePostBodyRequest({ | 267 | await makePostBodyRequest({ |
268 | url: server.url, | 268 | url: server.url, |
269 | path: path + '/toto@localhost:9002/accept', | 269 | path: path + '/toto@127.0.0.1:9002/accept', |
270 | token: userAccessToken, | 270 | token: userAccessToken, |
271 | expectedStatus: HttpStatusCode.FORBIDDEN_403 | 271 | expectedStatus: HttpStatusCode.FORBIDDEN_403 |
272 | }) | 272 | }) |
@@ -284,7 +284,7 @@ describe('Test server follows API validators', function () { | |||
284 | it('Should fail with an unknown follower', async function () { | 284 | it('Should fail with an unknown follower', async function () { |
285 | await makePostBodyRequest({ | 285 | await makePostBodyRequest({ |
286 | url: server.url, | 286 | url: server.url, |
287 | path: path + '/toto@localhost:9003/accept', | 287 | path: path + '/toto@127.0.0.1:9003/accept', |
288 | token: server.accessToken, | 288 | token: server.accessToken, |
289 | expectedStatus: HttpStatusCode.NOT_FOUND_404 | 289 | expectedStatus: HttpStatusCode.NOT_FOUND_404 |
290 | }) | 290 | }) |
@@ -297,7 +297,7 @@ describe('Test server follows API validators', function () { | |||
297 | it('Should fail with an invalid token', async function () { | 297 | it('Should fail with an invalid token', async function () { |
298 | await makePostBodyRequest({ | 298 | await makePostBodyRequest({ |
299 | url: server.url, | 299 | url: server.url, |
300 | path: path + '/toto@localhost:9002/reject', | 300 | path: path + '/toto@127.0.0.1:9002/reject', |
301 | token: 'fake_token', | 301 | token: 'fake_token', |
302 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 | 302 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 |
303 | }) | 303 | }) |
@@ -306,7 +306,7 @@ describe('Test server follows API validators', function () { | |||
306 | it('Should fail if the user is not an administrator', async function () { | 306 | it('Should fail if the user is not an administrator', async function () { |
307 | await makePostBodyRequest({ | 307 | await makePostBodyRequest({ |
308 | url: server.url, | 308 | url: server.url, |
309 | path: path + '/toto@localhost:9002/reject', | 309 | path: path + '/toto@127.0.0.1:9002/reject', |
310 | token: userAccessToken, | 310 | token: userAccessToken, |
311 | expectedStatus: HttpStatusCode.FORBIDDEN_403 | 311 | expectedStatus: HttpStatusCode.FORBIDDEN_403 |
312 | }) | 312 | }) |
@@ -324,7 +324,7 @@ describe('Test server follows API validators', function () { | |||
324 | it('Should fail with an unknown follower', async function () { | 324 | it('Should fail with an unknown follower', async function () { |
325 | await makePostBodyRequest({ | 325 | await makePostBodyRequest({ |
326 | url: server.url, | 326 | url: server.url, |
327 | path: path + '/toto@localhost:9003/reject', | 327 | path: path + '/toto@127.0.0.1:9003/reject', |
328 | token: server.accessToken, | 328 | token: server.accessToken, |
329 | expectedStatus: HttpStatusCode.NOT_FOUND_404 | 329 | expectedStatus: HttpStatusCode.NOT_FOUND_404 |
330 | }) | 330 | }) |
@@ -337,7 +337,7 @@ describe('Test server follows API validators', function () { | |||
337 | it('Should fail with an invalid token', async function () { | 337 | it('Should fail with an invalid token', async function () { |
338 | await makeDeleteRequest({ | 338 | await makeDeleteRequest({ |
339 | url: server.url, | 339 | url: server.url, |
340 | path: path + '/localhost:9002', | 340 | path: path + '/127.0.0.1:9002', |
341 | token: 'fake_token', | 341 | token: 'fake_token', |
342 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 | 342 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 |
343 | }) | 343 | }) |
@@ -346,7 +346,7 @@ describe('Test server follows API validators', function () { | |||
346 | it('Should fail if the user is not an administrator', async function () { | 346 | it('Should fail if the user is not an administrator', async function () { |
347 | await makeDeleteRequest({ | 347 | await makeDeleteRequest({ |
348 | url: server.url, | 348 | url: server.url, |
349 | path: path + '/localhost:9002', | 349 | path: path + '/127.0.0.1:9002', |
350 | token: userAccessToken, | 350 | token: userAccessToken, |
351 | expectedStatus: HttpStatusCode.FORBIDDEN_403 | 351 | expectedStatus: HttpStatusCode.FORBIDDEN_403 |
352 | }) | 352 | }) |