mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Server: split check params tests
This commit is contained in:
parent
818f7987eb
commit
efe923bcda
10 changed files with 1110 additions and 868 deletions
60
server/tests/api/check-params/remotes.js
Normal file
60
server/tests/api/check-params/remotes.js
Normal file
|
@ -0,0 +1,60 @@
|
|||
'use strict'
|
||||
|
||||
const series = require('async/series')
|
||||
|
||||
const loginUtils = require('../../utils/login')
|
||||
const serversUtils = require('../../utils/servers')
|
||||
|
||||
describe('Test remote videos API validators', function () {
|
||||
let server = null
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
before(function (done) {
|
||||
this.timeout(20000)
|
||||
|
||||
series([
|
||||
function (next) {
|
||||
serversUtils.flushTests(next)
|
||||
},
|
||||
function (next) {
|
||||
serversUtils.runServer(1, function (server1) {
|
||||
server = server1
|
||||
|
||||
next()
|
||||
})
|
||||
},
|
||||
function (next) {
|
||||
loginUtils.loginAndGetAccessToken(server, function (err, token) {
|
||||
if (err) throw err
|
||||
server.accessToken = token
|
||||
|
||||
next()
|
||||
})
|
||||
}
|
||||
], done)
|
||||
})
|
||||
|
||||
describe('When making a secure request', function () {
|
||||
it('Should check a secure request')
|
||||
})
|
||||
|
||||
describe('When adding a video', function () {
|
||||
it('Should check when adding a video')
|
||||
})
|
||||
|
||||
describe('When removing a video', function () {
|
||||
it('Should check when removing a video')
|
||||
})
|
||||
|
||||
after(function (done) {
|
||||
process.kill(-server.app.pid)
|
||||
|
||||
// Keep the logs if the test failed
|
||||
if (this.ok) {
|
||||
serversUtils.flushTests(done)
|
||||
} else {
|
||||
done()
|
||||
}
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue