]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/user-subscriptions.ts
Fix s3 mock cleanup
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / user-subscriptions.ts
index a13ed5aa3eab1edf9cc6b5ae4e0ee529b41814e6..c4922c7a2d2ef2db6cb3f918adcf03f71411140e 100644 (file)
@@ -1,6 +1,5 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import 'mocha'
 import {
   cleanupTests,
   createSingleServer,
@@ -105,7 +104,7 @@ describe('Test user subscriptions API validators', function () {
       await makePostBodyRequest({
         url: server.url,
         path,
-        fields: { uri: 'user1_channel@localhost:' + server.port },
+        fields: { uri: 'user1_channel@' + server.host },
         expectedStatus: HttpStatusCode.UNAUTHORIZED_401
       })
     })
@@ -143,7 +142,7 @@ describe('Test user subscriptions API validators', function () {
         url: server.url,
         path,
         token: server.accessToken,
-        fields: { uri: 'user1_channel@localhost:' + server.port },
+        fields: { uri: 'user1_channel@' + server.host },
         expectedStatus: HttpStatusCode.NO_CONTENT_204
       })
 
@@ -155,7 +154,7 @@ describe('Test user subscriptions API validators', function () {
     it('Should fail with a non authenticated user', async function () {
       await makeGetRequest({
         url: server.url,
-        path: path + '/user1_channel@localhost:' + server.port,
+        path: path + '/user1_channel@' + server.host,
         expectedStatus: HttpStatusCode.UNAUTHORIZED_401
       })
     })
@@ -186,7 +185,7 @@ describe('Test user subscriptions API validators', function () {
     it('Should fail with an unknown subscription', async function () {
       await makeGetRequest({
         url: server.url,
-        path: path + '/root1@localhost:' + server.port,
+        path: path + '/root1@' + server.host,
         token: server.accessToken,
         expectedStatus: HttpStatusCode.NOT_FOUND_404
       })
@@ -195,7 +194,7 @@ describe('Test user subscriptions API validators', function () {
     it('Should succeed with the correct parameters', async function () {
       await makeGetRequest({
         url: server.url,
-        path: path + '/user1_channel@localhost:' + server.port,
+        path: path + '/user1_channel@' + server.host,
         token: server.accessToken,
         expectedStatus: HttpStatusCode.OK_200
       })
@@ -235,7 +234,7 @@ describe('Test user subscriptions API validators', function () {
       await makeGetRequest({
         url: server.url,
         path: existPath,
-        query: { 'uris[]': 'coucou@localhost:' + server.port },
+        query: { 'uris[]': 'coucou@' + server.host },
         token: server.accessToken,
         expectedStatus: HttpStatusCode.OK_200
       })
@@ -246,7 +245,7 @@ describe('Test user subscriptions API validators', function () {
     it('Should fail with a non authenticated user', async function () {
       await makeDeleteRequest({
         url: server.url,
-        path: path + '/user1_channel@localhost:' + server.port,
+        path: path + '/user1_channel@' + server.host,
         expectedStatus: HttpStatusCode.UNAUTHORIZED_401
       })
     })
@@ -277,7 +276,7 @@ describe('Test user subscriptions API validators', function () {
     it('Should fail with an unknown subscription', async function () {
       await makeDeleteRequest({
         url: server.url,
-        path: path + '/root1@localhost:' + server.port,
+        path: path + '/root1@' + server.host,
         token: server.accessToken,
         expectedStatus: HttpStatusCode.NOT_FOUND_404
       })
@@ -286,7 +285,7 @@ describe('Test user subscriptions API validators', function () {
     it('Should succeed with the correct parameters', async function () {
       await makeDeleteRequest({
         url: server.url,
-        path: path + '/user1_channel@localhost:' + server.port,
+        path: path + '/user1_channel@' + server.host,
         token: server.accessToken,
         expectedStatus: HttpStatusCode.NO_CONTENT_204
       })