ServerInfo,
setAccessTokensToServers,
stopFfmpeg,
- updateCustomSubConfig,
updateLive,
uploadVideoAndGetId,
userLogin,
await setAccessTokensToServers([ server ])
- await updateCustomSubConfig(server.url, server.accessToken, {
- live: {
- enabled: true,
- maxInstanceLives: 20,
- maxUserLives: 20,
- allowReplay: true
+ await server.configCommand.updateCustomSubConfig({
+ newConfig: {
+ live: {
+ enabled: true,
+ maxInstanceLives: 20,
+ maxUserLives: 20,
+ allowReplay: true
+ }
}
})
})
it('Should forbid if live is disabled', async function () {
- await updateCustomSubConfig(server.url, server.accessToken, {
- live: {
- enabled: false
+ await server.configCommand.updateCustomSubConfig({
+ newConfig: {
+ live: {
+ enabled: false
+ }
}
})
it('Should forbid to save replay if not enabled by the admin', async function () {
const fields = immutableAssign(baseCorrectParams, { saveReplay: true })
- await updateCustomSubConfig(server.url, server.accessToken, {
- live: {
- enabled: true,
- allowReplay: false
+ await server.configCommand.updateCustomSubConfig({
+ newConfig: {
+ live: {
+ enabled: true,
+ allowReplay: false
+ }
}
})
it('Should allow to save replay if enabled by the admin', async function () {
const fields = immutableAssign(baseCorrectParams, { saveReplay: true })
- await updateCustomSubConfig(server.url, server.accessToken, {
- live: {
- enabled: true,
- allowReplay: true
+ await server.configCommand.updateCustomSubConfig({
+ newConfig: {
+ live: {
+ enabled: true,
+ allowReplay: true
+ }
}
})
})
it('Should not allow live if max instance lives is reached', async function () {
- await updateCustomSubConfig(server.url, server.accessToken, {
- live: {
- enabled: true,
- maxInstanceLives: 1
+ await server.configCommand.updateCustomSubConfig({
+ newConfig: {
+ live: {
+ enabled: true,
+ maxInstanceLives: 1
+ }
}
})
})
it('Should not allow live if max user lives is reached', async function () {
- await updateCustomSubConfig(server.url, server.accessToken, {
- live: {
- enabled: true,
- maxInstanceLives: 20,
- maxUserLives: 1
+ await server.configCommand.updateCustomSubConfig({
+ newConfig: {
+ live: {
+ enabled: true,
+ maxInstanceLives: 20,
+ maxUserLives: 1
+ }
}
})
})
it('Should fail to update replay status if replay is not allowed on the instance', async function () {
- await updateCustomSubConfig(server.url, server.accessToken, {
- live: {
- enabled: true,
- allowReplay: false
+ await server.configCommand.updateCustomSubConfig({
+ newConfig: {
+ live: {
+ enabled: true,
+ allowReplay: false
+ }
}
})