]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/videos.ts
Optimise transaction for video upload
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / videos.ts
index 5860e91951bd6d719308073fce768fbc475aa4ba..00a209665d7ed211f0b2e1887300205ff0857826 100644 (file)
@@ -189,14 +189,6 @@ describe('Test videos API validator', function () {
       await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
     })
 
-    it('Should fail without a category', async function () {
-      const fields = getCompleteVideoUploadAttributes()
-      delete fields.category
-
-      const attaches = getVideoUploadAttaches
-      await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
-    })
-
     it('Should fail with a bad category', async function () {
       const fields = getCompleteVideoUploadAttributes()
       fields.category = 125
@@ -205,14 +197,6 @@ describe('Test videos API validator', function () {
       await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
     })
 
-    it('Should fail without a licence', async function () {
-      const fields = getCompleteVideoUploadAttributes()
-      delete fields.licence
-
-      const attaches = getVideoUploadAttaches()
-      await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
-    })
-
     it('Should fail with a bad licence', async function () {
       const fields = getCompleteVideoUploadAttributes()
       fields.licence = 125
@@ -245,14 +229,6 @@ describe('Test videos API validator', function () {
       await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
     })
 
-    it('Should fail without description', async function () {
-      const fields = getCompleteVideoUploadAttributes()
-      delete fields.description
-
-      const attaches = getVideoUploadAttaches()
-      await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
-    })
-
     it('Should fail with a long description', async function () {
       const fields = getCompleteVideoUploadAttributes()
       fields.description = 'my super description which is very very very very very very very very very very very very long'.repeat(35)
@@ -333,14 +309,6 @@ describe('Test videos API validator', function () {
       await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
     })
 
-    it('Should fail with a too big duration', async function () {
-      const fields = getCompleteVideoUploadAttributes()
-      const attaches = {
-        'videofile': join(__dirname, '..', 'fixtures', 'video_too_long.webm')
-      }
-      await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
-    })
-
     it('Should succeed with the correct parameters', async function () {
       this.timeout(10000)
 
@@ -473,7 +441,7 @@ describe('Test videos API validator', function () {
 
     it('Should fail with a video of another user')
 
-    it('Should fail with a video of another pod')
+    it('Should fail with a video of another server')
 
     it('Should succeed with the correct parameters', async function () {
       const fields = getCompleteVideoUpdateAttributes()
@@ -584,7 +552,7 @@ describe('Test videos API validator', function () {
 
     it('Should fail with a video of another user')
 
-    it('Should fail with a video of another pod')
+    it('Should fail with a video of another server')
 
     it('Should succeed with the correct parameters')
   })