mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Add ffprobe helper
This commit is contained in:
parent
2e9c7877eb
commit
754c52b9b9
4 changed files with 31 additions and 0 deletions
|
@ -224,6 +224,7 @@ describe('Test plugin helpers', function () {
|
|||
|
||||
describe('Videos', function () {
|
||||
let videoUUID: string
|
||||
let videoPath: string
|
||||
|
||||
before(async () => {
|
||||
this.timeout(240000)
|
||||
|
@ -260,6 +261,8 @@ describe('Test plugin helpers', function () {
|
|||
await makeRawRequest(file.url, HttpStatusCode.OK_200)
|
||||
}
|
||||
}
|
||||
|
||||
videoPath = body.webtorrent.videoFiles[0].path
|
||||
}
|
||||
|
||||
// Thumbnails check
|
||||
|
@ -278,6 +281,20 @@ describe('Test plugin helpers', function () {
|
|||
}
|
||||
})
|
||||
|
||||
it('Should probe a file', async function () {
|
||||
const { body } = await makeGetRequest({
|
||||
url: servers[0].url,
|
||||
path: '/plugins/test-four/router/ffprobe',
|
||||
query: {
|
||||
path: videoPath
|
||||
},
|
||||
expectedStatus: HttpStatusCode.OK_200
|
||||
})
|
||||
|
||||
expect(body.streams).to.be.an('array')
|
||||
expect(body.streams).to.have.lengthOf(2)
|
||||
})
|
||||
|
||||
it('Should remove a video after a view', async function () {
|
||||
this.timeout(40000)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue