mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Shorter server command names
This commit is contained in:
parent
d23dd9fbfc
commit
89d241a79c
155 changed files with 2508 additions and 2508 deletions
|
@ -32,13 +32,13 @@ describe('Test live constraints', function () {
|
|||
saveReplay
|
||||
}
|
||||
|
||||
const { uuid } = await servers[0].liveCommand.create({ token: userAccessToken, fields: liveAttributes })
|
||||
const { uuid } = await servers[0].live.create({ token: userAccessToken, fields: liveAttributes })
|
||||
return uuid
|
||||
}
|
||||
|
||||
async function checkSaveReplay (videoId: string, resolutions = [ 720 ]) {
|
||||
for (const server of servers) {
|
||||
const video = await server.videosCommand.get({ id: videoId })
|
||||
const video = await server.videos.get({ id: videoId })
|
||||
expect(video.isLive).to.be.false
|
||||
expect(video.duration).to.be.greaterThan(0)
|
||||
}
|
||||
|
@ -48,12 +48,12 @@ describe('Test live constraints', function () {
|
|||
|
||||
async function waitUntilLivePublishedOnAllServers (videoId: string) {
|
||||
for (const server of servers) {
|
||||
await server.liveCommand.waitUntilPublished({ videoId })
|
||||
await server.live.waitUntilPublished({ videoId })
|
||||
}
|
||||
}
|
||||
|
||||
function updateQuota (options: { total: number, daily: number }) {
|
||||
return servers[0].usersCommand.update({
|
||||
return servers[0].users.update({
|
||||
userId,
|
||||
videoQuota: options.total,
|
||||
videoQuotaDaily: options.daily
|
||||
|
@ -69,7 +69,7 @@ describe('Test live constraints', function () {
|
|||
await setAccessTokensToServers(servers)
|
||||
await setDefaultVideoChannel(servers)
|
||||
|
||||
await servers[0].configCommand.updateCustomSubConfig({
|
||||
await servers[0].config.updateCustomSubConfig({
|
||||
newConfig: {
|
||||
live: {
|
||||
enabled: true,
|
||||
|
@ -82,7 +82,7 @@ describe('Test live constraints', function () {
|
|||
})
|
||||
|
||||
{
|
||||
const res = await servers[0].usersCommand.generate('user1')
|
||||
const res = await servers[0].users.generate('user1')
|
||||
userId = res.userId
|
||||
userChannelId = res.userChannelId
|
||||
userAccessToken = res.token
|
||||
|
@ -98,7 +98,7 @@ describe('Test live constraints', function () {
|
|||
this.timeout(60000)
|
||||
|
||||
const userVideoLiveoId = await createLiveWrapper(false)
|
||||
await servers[0].liveCommand.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: false })
|
||||
await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: false })
|
||||
})
|
||||
|
||||
it('Should have size limit depending on user global quota if save replay is enabled', async function () {
|
||||
|
@ -108,7 +108,7 @@ describe('Test live constraints', function () {
|
|||
await wait(5000)
|
||||
|
||||
const userVideoLiveoId = await createLiveWrapper(true)
|
||||
await servers[0].liveCommand.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true })
|
||||
await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true })
|
||||
|
||||
await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
|
||||
await waitJobs(servers)
|
||||
|
@ -125,7 +125,7 @@ describe('Test live constraints', function () {
|
|||
await updateQuota({ total: -1, daily: 1 })
|
||||
|
||||
const userVideoLiveoId = await createLiveWrapper(true)
|
||||
await servers[0].liveCommand.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true })
|
||||
await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true })
|
||||
|
||||
await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
|
||||
await waitJobs(servers)
|
||||
|
@ -142,13 +142,13 @@ describe('Test live constraints', function () {
|
|||
await updateQuota({ total: 10 * 1000 * 1000, daily: -1 })
|
||||
|
||||
const userVideoLiveoId = await createLiveWrapper(true)
|
||||
await servers[0].liveCommand.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: false })
|
||||
await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: false })
|
||||
})
|
||||
|
||||
it('Should have max duration limit', async function () {
|
||||
this.timeout(60000)
|
||||
|
||||
await servers[0].configCommand.updateCustomSubConfig({
|
||||
await servers[0].config.updateCustomSubConfig({
|
||||
newConfig: {
|
||||
live: {
|
||||
enabled: true,
|
||||
|
@ -163,7 +163,7 @@ describe('Test live constraints', function () {
|
|||
})
|
||||
|
||||
const userVideoLiveoId = await createLiveWrapper(true)
|
||||
await servers[0].liveCommand.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true })
|
||||
await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true })
|
||||
|
||||
await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
|
||||
await waitJobs(servers)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue