aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/real-world/tools
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-03-26 18:39:01 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-03-26 18:39:01 +0200
commitb4c5ac97ffa3e16f837b7e2d72291656eefac812 (patch)
treebebc031f07e4a4d6cea370690b696f10273d9b47 /server/tests/real-world/tools
parentf6e692f5ee2a0e8e1fcb75df1949b354a014ad50 (diff)
downloadPeerTube-b4c5ac97ffa3e16f837b7e2d72291656eefac812.tar.gz
PeerTube-b4c5ac97ffa3e16f837b7e2d72291656eefac812.tar.zst
PeerTube-b4c5ac97ffa3e16f837b7e2d72291656eefac812.zip
Server: refractoring upload/update video test utils
Diffstat (limited to 'server/tests/real-world/tools')
-rw-r--r--server/tests/real-world/tools/upload.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/server/tests/real-world/tools/upload.js b/server/tests/real-world/tools/upload.js
index 49076ee2a..856251c7f 100644
--- a/server/tests/real-world/tools/upload.js
+++ b/server/tests/real-world/tools/upload.js
@@ -49,10 +49,17 @@ function list (val) {
49 return val.split(',') 49 return val.split(',')
50} 50}
51 51
52function upload (url, accessToken, name, category, description, tags, file) { 52function upload (url, accessToken, name, category, description, tags, fixture) {
53 console.log('Uploading %s video...', program.name) 53 console.log('Uploading %s video...', program.name)
54 54
55 utils.uploadVideo(url, accessToken, name, category, description, tags, file, function (err) { 55 const videoAttributes = {
56 name,
57 category,
58 description,
59 tags,
60 fixture
61 }
62 utils.uploadVideo(url, accessToken, videoAttributes, function (err) {
56 if (err) throw err 63 if (err) throw err
57 64
58 console.log('Video uploaded.') 65 console.log('Video uploaded.')