mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Shorter server command names
This commit is contained in:
parent
d23dd9fbfc
commit
89d241a79c
155 changed files with 2508 additions and 2508 deletions
|
@ -42,12 +42,12 @@ describe('Test create transcoding jobs', function () {
|
|||
servers = await flushAndRunMultipleServers(2)
|
||||
await setAccessTokensToServers(servers)
|
||||
|
||||
await servers[0].configCommand.updateCustomSubConfig({ newConfig: config })
|
||||
await servers[0].config.updateCustomSubConfig({ newConfig: config })
|
||||
|
||||
await doubleFollow(servers[0], servers[1])
|
||||
|
||||
for (let i = 1; i <= 5; i++) {
|
||||
const { uuid } = await servers[0].videosCommand.upload({ attributes: { name: 'video' + i } })
|
||||
const { uuid } = await servers[0].videos.upload({ attributes: { name: 'video' + i } })
|
||||
videosUUID.push(uuid)
|
||||
}
|
||||
|
||||
|
@ -58,11 +58,11 @@ describe('Test create transcoding jobs', function () {
|
|||
this.timeout(30000)
|
||||
|
||||
for (const server of servers) {
|
||||
const { data } = await server.videosCommand.list()
|
||||
const { data } = await server.videos.list()
|
||||
expect(data).to.have.lengthOf(videosUUID.length)
|
||||
|
||||
for (const video of data) {
|
||||
const videoDetail = await server.videosCommand.get({ id: video.uuid })
|
||||
const videoDetail = await server.videos.get({ id: video.uuid })
|
||||
expect(videoDetail.files).to.have.lengthOf(1)
|
||||
expect(videoDetail.streamingPlaylists).to.have.lengthOf(0)
|
||||
}
|
||||
|
@ -72,16 +72,16 @@ describe('Test create transcoding jobs', function () {
|
|||
it('Should run a transcoding job on video 2', async function () {
|
||||
this.timeout(60000)
|
||||
|
||||
await servers[0].cliCommand.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[1]}`)
|
||||
await servers[0].cli.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[1]}`)
|
||||
await waitJobs(servers)
|
||||
|
||||
for (const server of servers) {
|
||||
const { data } = await server.videosCommand.list()
|
||||
const { data } = await server.videos.list()
|
||||
|
||||
let infoHashes: { [id: number]: string }
|
||||
|
||||
for (const video of data) {
|
||||
const videoDetail = await server.videosCommand.get({ id: video.uuid })
|
||||
const videoDetail = await server.videos.get({ id: video.uuid })
|
||||
|
||||
if (video.uuid === videosUUID[1]) {
|
||||
expect(videoDetail.files).to.have.lengthOf(4)
|
||||
|
@ -110,15 +110,15 @@ describe('Test create transcoding jobs', function () {
|
|||
it('Should run a transcoding job on video 1 with resolution', async function () {
|
||||
this.timeout(60000)
|
||||
|
||||
await servers[0].cliCommand.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[0]} -r 480`)
|
||||
await servers[0].cli.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[0]} -r 480`)
|
||||
|
||||
await waitJobs(servers)
|
||||
|
||||
for (const server of servers) {
|
||||
const { data } = await server.videosCommand.list()
|
||||
const { data } = await server.videos.list()
|
||||
expect(data).to.have.lengthOf(videosUUID.length)
|
||||
|
||||
const videoDetails = await server.videosCommand.get({ id: videosUUID[0] })
|
||||
const videoDetails = await server.videos.get({ id: videosUUID[0] })
|
||||
|
||||
expect(videoDetails.files).to.have.lengthOf(2)
|
||||
expect(videoDetails.files[0].resolution.id).to.equal(720)
|
||||
|
@ -131,12 +131,12 @@ describe('Test create transcoding jobs', function () {
|
|||
it('Should generate an HLS resolution', async function () {
|
||||
this.timeout(120000)
|
||||
|
||||
await servers[0].cliCommand.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[2]} --generate-hls -r 480`)
|
||||
await servers[0].cli.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[2]} --generate-hls -r 480`)
|
||||
|
||||
await waitJobs(servers)
|
||||
|
||||
for (const server of servers) {
|
||||
const videoDetails = await server.videosCommand.get({ id: videosUUID[2] })
|
||||
const videoDetails = await server.videos.get({ id: videosUUID[2] })
|
||||
|
||||
expect(videoDetails.files).to.have.lengthOf(1)
|
||||
expect(videoDetails.streamingPlaylists).to.have.lengthOf(1)
|
||||
|
@ -150,12 +150,12 @@ describe('Test create transcoding jobs', function () {
|
|||
it('Should not duplicate an HLS resolution', async function () {
|
||||
this.timeout(120000)
|
||||
|
||||
await servers[0].cliCommand.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[2]} --generate-hls -r 480`)
|
||||
await servers[0].cli.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[2]} --generate-hls -r 480`)
|
||||
|
||||
await waitJobs(servers)
|
||||
|
||||
for (const server of servers) {
|
||||
const videoDetails = await server.videosCommand.get({ id: videosUUID[2] })
|
||||
const videoDetails = await server.videos.get({ id: videosUUID[2] })
|
||||
|
||||
const files = videoDetails.streamingPlaylists[0].files
|
||||
expect(files).to.have.lengthOf(1)
|
||||
|
@ -166,12 +166,12 @@ describe('Test create transcoding jobs', function () {
|
|||
it('Should generate all HLS resolutions', async function () {
|
||||
this.timeout(120000)
|
||||
|
||||
await servers[0].cliCommand.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[3]} --generate-hls`)
|
||||
await servers[0].cli.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[3]} --generate-hls`)
|
||||
|
||||
await waitJobs(servers)
|
||||
|
||||
for (const server of servers) {
|
||||
const videoDetails = await server.videosCommand.get({ id: videosUUID[3] })
|
||||
const videoDetails = await server.videos.get({ id: videosUUID[3] })
|
||||
|
||||
expect(videoDetails.files).to.have.lengthOf(1)
|
||||
expect(videoDetails.streamingPlaylists).to.have.lengthOf(1)
|
||||
|
@ -185,14 +185,14 @@ describe('Test create transcoding jobs', function () {
|
|||
this.timeout(120000)
|
||||
|
||||
config.transcoding.hls.enabled = true
|
||||
await servers[0].configCommand.updateCustomSubConfig({ newConfig: config })
|
||||
await servers[0].config.updateCustomSubConfig({ newConfig: config })
|
||||
|
||||
await servers[0].cliCommand.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[4]}`)
|
||||
await servers[0].cli.execWithEnv(`npm run create-transcoding-job -- -v ${videosUUID[4]}`)
|
||||
|
||||
await waitJobs(servers)
|
||||
|
||||
for (const server of servers) {
|
||||
const videoDetails = await server.videosCommand.get({ id: videosUUID[4] })
|
||||
const videoDetails = await server.videos.get({ id: videosUUID[4] })
|
||||
|
||||
expect(videoDetails.files).to.have.lengthOf(4)
|
||||
expect(videoDetails.streamingPlaylists).to.have.lengthOf(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue