aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/real-world
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/real-world')
-rw-r--r--server/tests/real-world/real-world.js3
-rw-r--r--server/tests/real-world/tools/upload.js6
2 files changed, 7 insertions, 2 deletions
diff --git a/server/tests/real-world/real-world.js b/server/tests/real-world/real-world.js
index ddce45cde..21f0732d0 100644
--- a/server/tests/real-world/real-world.js
+++ b/server/tests/real-world/real-world.js
@@ -21,7 +21,7 @@ program
21 .option('-u, --update [weight]', 'Weight for updating videos') 21 .option('-u, --update [weight]', 'Weight for updating videos')
22 .option('-v, --view [weight]', 'Weight for viewing videos') 22 .option('-v, --view [weight]', 'Weight for viewing videos')
23 .option('-l, --like [weight]', 'Weight for liking videos') 23 .option('-l, --like [weight]', 'Weight for liking videos')
24 .option('-s --dislike [weight]', 'Weight for disliking videos') 24 .option('-s, --dislike [weight]', 'Weight for disliking videos')
25 .option('-p, --pods [n]', 'Number of pods to run (3 or 6)', /^3|6$/, 3) 25 .option('-p, --pods [n]', 'Number of pods to run (3 or 6)', /^3|6$/, 3)
26 .option('-a, --action [interval]', 'Interval in ms for an action') 26 .option('-a, --action [interval]', 'Interval in ms for an action')
27 .option('-i, --integrity [interval]', 'Interval in ms for an integrity check') 27 .option('-i, --integrity [interval]', 'Interval in ms for an integrity check')
@@ -207,6 +207,7 @@ function upload (servers, numServer, callback) {
207 category: 4, 207 category: 4,
208 nsfw: false, 208 nsfw: false,
209 licence: 2, 209 licence: 2,
210 language: 1,
210 description: Date.now() + ' description', 211 description: Date.now() + ' description',
211 tags: [ Date.now().toString().substring(0, 5) + 't1', Date.now().toString().substring(0, 5) + 't2' ], 212 tags: [ Date.now().toString().substring(0, 5) + 't1', Date.now().toString().substring(0, 5) + 't2' ],
212 fixture: 'video_short1.webm' 213 fixture: 'video_short1.webm'
diff --git a/server/tests/real-world/tools/upload.js b/server/tests/real-world/tools/upload.js
index 4b6dbe603..efb91e228 100644
--- a/server/tests/real-world/tools/upload.js
+++ b/server/tests/real-world/tools/upload.js
@@ -12,6 +12,7 @@ program
12 .option('-x, --nsfw', 'Video is Not Safe For Work') 12 .option('-x, --nsfw', 'Video is Not Safe For Work')
13 .option('-c, --category <category number>', 'Category number') 13 .option('-c, --category <category number>', 'Category number')
14 .option('-l, --licence <licence number>', 'Licence number') 14 .option('-l, --licence <licence number>', 'Licence number')
15 .option('-g, --language <language number>', 'Language number')
15 .option('-d, --description <description>', 'Video description') 16 .option('-d, --description <description>', 'Video description')
16 .option('-t, --tags <tags>', 'Video tags', list) 17 .option('-t, --tags <tags>', 'Video tags', list)
17 .option('-f, --file <file>', 'Video absolute file path') 18 .option('-f, --file <file>', 'Video absolute file path')
@@ -23,6 +24,7 @@ if (
23 !program.name || 24 !program.name ||
24 !program.category || 25 !program.category ||
25 !program.licence || 26 !program.licence ||
27 !program.language ||
26 !program.nsfw || 28 !program.nsfw ||
27 !program.description || 29 !program.description ||
28 !program.tags || 30 !program.tags ||
@@ -42,6 +44,7 @@ fs.access(program.file, fs.F_OK, function (err) {
42 program.name, 44 program.name,
43 program.category, 45 program.category,
44 program.licence, 46 program.licence,
47 program.language,
45 program.nsfw, 48 program.nsfw,
46 program.description, 49 program.description,
47 program.tags, 50 program.tags,
@@ -55,13 +58,14 @@ function list (val) {
55 return val.split(',') 58 return val.split(',')
56} 59}
57 60
58function upload (url, accessToken, name, category, licence, nsfw, description, tags, fixture) { 61function upload (url, accessToken, name, category, licence, language, nsfw, description, tags, fixture) {
59 console.log('Uploading %s video...', program.name) 62 console.log('Uploading %s video...', program.name)
60 63
61 const videoAttributes = { 64 const videoAttributes = {
62 name, 65 name,
63 category, 66 category,
64 licence, 67 licence,
68 language,
65 nsfw, 69 nsfw,
66 description, 70 description,
67 tags, 71 tags,