Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
9295c68b
Verified
Commit
9295c68b
authored
May 03, 2022
by
Chocobozzz
Browse files
Fix live constraints tests
parent
39e68a32
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/helpers/geo-ip.ts
View file @
9295c68b
...
...
@@ -53,7 +53,7 @@ export class GeoIP {
await
writeFile
(
mmdbPath
,
gotResult
.
body
)
// Reini reader
// Reini
t
reader
this
.
reader
=
undefined
logger
.
info
(
'
GeoIP database updated %s.
'
,
mmdbPath
,
lTags
())
...
...
server/tests/api/live/live-constraints.ts
View file @
9295c68b
...
...
@@ -13,6 +13,7 @@ import {
setAccessTokensToServers
,
setDefaultVideoChannel
,
waitJobs
,
waitUntilLiveReplacedByReplayOnAllServers
,
waitUntilLiveWaitingOnAllServers
}
from
'
@shared/server-commands
'
import
{
checkLiveCleanup
}
from
'
../../shared
'
...
...
@@ -53,12 +54,6 @@ describe('Test live constraints', function () {
await
checkLiveCleanup
(
servers
[
0
],
videoId
,
resolutions
)
}
async
function
waitUntilLivePublishedOnAllServers
(
videoId
:
string
)
{
for
(
const
server
of
servers
)
{
await
server
.
live
.
waitUntilPublished
({
videoId
})
}
}
function
updateQuota
(
options
:
{
total
:
number
,
daily
:
number
})
{
return
servers
[
0
].
users
.
update
({
userId
,
...
...
@@ -117,7 +112,7 @@ describe('Test live constraints', function () {
const
userVideoLiveoId
=
await
createLiveWrapper
({
replay
:
true
,
permanent
:
false
})
await
servers
[
0
].
live
.
runAndTestStreamError
({
token
:
userAccessToken
,
videoId
:
userVideoLiveoId
,
shouldHaveError
:
true
})
await
waitUntilLive
Published
OnAllServers
(
userVideoLiveoId
)
await
waitUntilLive
ReplacedByReplay
OnAllServers
(
servers
,
userVideoLiveoId
)
await
waitJobs
(
servers
)
await
checkSaveReplay
(
userVideoLiveoId
)
...
...
@@ -153,7 +148,7 @@ describe('Test live constraints', function () {
const
userVideoLiveoId
=
await
createLiveWrapper
({
replay
:
true
,
permanent
:
false
})
await
servers
[
0
].
live
.
runAndTestStreamError
({
token
:
userAccessToken
,
videoId
:
userVideoLiveoId
,
shouldHaveError
:
true
})
await
waitUntilLive
Published
OnAllServers
(
userVideoLiveoId
)
await
waitUntilLive
ReplacedByReplay
OnAllServers
(
servers
,
userVideoLiveoId
)
await
waitJobs
(
servers
)
await
checkSaveReplay
(
userVideoLiveoId
)
...
...
@@ -194,7 +189,7 @@ describe('Test live constraints', function () {
const
userVideoLiveoId
=
await
createLiveWrapper
({
replay
:
true
,
permanent
:
false
})
await
servers
[
0
].
live
.
runAndTestStreamError
({
token
:
userAccessToken
,
videoId
:
userVideoLiveoId
,
shouldHaveError
:
true
})
await
waitUntilLive
Published
OnAllServers
(
userVideoLiveoId
)
await
waitUntilLive
ReplacedByReplay
OnAllServers
(
servers
,
userVideoLiveoId
)
await
waitJobs
(
servers
)
await
checkSaveReplay
(
userVideoLiveoId
,
[
720
,
480
,
360
,
240
,
144
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment