]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/real-world/tools/upload.js
Server: refractoring upload/update video test utils
[github/Chocobozzz/PeerTube.git] / server / tests / real-world / tools / upload.js
index 49076ee2ad809df6c4e1b5e49815e78d781db3cc..856251c7fd9b8fc87ed3af119fe61667c37f5a8f 100644 (file)
@@ -49,10 +49,17 @@ function list (val) {
   return val.split(',')
 }
 
-function upload (url, accessToken, name, category, description, tags, file) {
+function upload (url, accessToken, name, category, description, tags, fixture) {
   console.log('Uploading %s video...', program.name)
 
-  utils.uploadVideo(url, accessToken, name, category, description, tags, file, function (err) {
+  const videoAttributes = {
+    name,
+    category,
+    description,
+    tags,
+    fixture
+  }
+  utils.uploadVideo(url, accessToken, videoAttributes, function (err) {
     if (err) throw err
 
     console.log('Video uploaded.')