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.js1
-rw-r--r--server/tests/real-world/tools/upload.js6
2 files changed, 6 insertions, 1 deletions
diff --git a/server/tests/real-world/real-world.js b/server/tests/real-world/real-world.js
index 7777768c8..ddce45cde 100644
--- a/server/tests/real-world/real-world.js
+++ b/server/tests/real-world/real-world.js
@@ -205,6 +205,7 @@ function upload (servers, numServer, callback) {
205 const videoAttributes = { 205 const videoAttributes = {
206 name: Date.now() + ' name', 206 name: Date.now() + ' name',
207 category: 4, 207 category: 4,
208 nsfw: false,
208 licence: 2, 209 licence: 2,
209 description: Date.now() + ' description', 210 description: Date.now() + ' description',
210 tags: [ Date.now().toString().substring(0, 5) + 't1', Date.now().toString().substring(0, 5) + 't2' ], 211 tags: [ Date.now().toString().substring(0, 5) + 't1', Date.now().toString().substring(0, 5) + 't2' ],
diff --git a/server/tests/real-world/tools/upload.js b/server/tests/real-world/tools/upload.js
index 7b97ebf0b..4b6dbe603 100644
--- a/server/tests/real-world/tools/upload.js
+++ b/server/tests/real-world/tools/upload.js
@@ -9,6 +9,7 @@ program
9 .option('-u, --url <url>', 'Server url') 9 .option('-u, --url <url>', 'Server url')
10 .option('-a, --access-token <token>', 'Access token') 10 .option('-a, --access-token <token>', 'Access token')
11 .option('-n, --name <name>', 'Video name') 11 .option('-n, --name <name>', 'Video name')
12 .option('-x, --nsfw', 'Video is Not Safe For Work')
12 .option('-c, --category <category number>', 'Category number') 13 .option('-c, --category <category number>', 'Category number')
13 .option('-l, --licence <licence number>', 'Licence number') 14 .option('-l, --licence <licence number>', 'Licence number')
14 .option('-d, --description <description>', 'Video description') 15 .option('-d, --description <description>', 'Video description')
@@ -22,6 +23,7 @@ if (
22 !program.name || 23 !program.name ||
23 !program.category || 24 !program.category ||
24 !program.licence || 25 !program.licence ||
26 !program.nsfw ||
25 !program.description || 27 !program.description ||
26 !program.tags || 28 !program.tags ||
27 !Array.isArray(program.tags) || 29 !Array.isArray(program.tags) ||
@@ -40,6 +42,7 @@ fs.access(program.file, fs.F_OK, function (err) {
40 program.name, 42 program.name,
41 program.category, 43 program.category,
42 program.licence, 44 program.licence,
45 program.nsfw,
43 program.description, 46 program.description,
44 program.tags, 47 program.tags,
45 program.file 48 program.file
@@ -52,13 +55,14 @@ function list (val) {
52 return val.split(',') 55 return val.split(',')
53} 56}
54 57
55function upload (url, accessToken, name, category, licence, description, tags, fixture) { 58function upload (url, accessToken, name, category, licence, nsfw, description, tags, fixture) {
56 console.log('Uploading %s video...', program.name) 59 console.log('Uploading %s video...', program.name)
57 60
58 const videoAttributes = { 61 const videoAttributes = {
59 name, 62 name,
60 category, 63 category,
61 licence, 64 licence,
65 nsfw,
62 description, 66 description,
63 tags, 67 tags,
64 fixture 68 fixture