import * as chai from 'chai'
import { join } from 'path'
import { ffprobePromise, getVideoStreamFromFile } from '@server/helpers/ffprobe-utils'
-import { HttpStatusCode } from '@shared/core-utils'
import {
checkLiveCleanup,
checkLiveSegmentHash,
checkResolutionsInMasterPlaylist,
cleanupTests,
+ createMultipleServers,
doubleFollow,
- flushAndRunMultipleServers,
killallServers,
LiveCommand,
makeRawRequest,
- reRunServer,
+ PeerTubeServer,
sendRTMPStream,
- ServerInfo,
setAccessTokensToServers,
setDefaultVideoChannel,
stopFfmpeg,
waitJobs,
waitUntilLivePublishedOnAllServers
} from '@shared/extra-utils'
-import { LiveVideo, LiveVideoCreate, VideoDetails, VideoPrivacy, VideoState, VideoStreamingPlaylistType } from '@shared/models'
+import {
+ HttpStatusCode,
+ LiveVideo,
+ LiveVideoCreate,
+ VideoDetails,
+ VideoPrivacy,
+ VideoState,
+ VideoStreamingPlaylistType
+} from '@shared/models'
const expect = chai.expect
describe('Test live', function () {
- let servers: ServerInfo[] = []
+ let servers: PeerTubeServer[] = []
let commands: LiveCommand[]
before(async function () {
this.timeout(120000)
- servers = await flushAndRunMultipleServers(2)
+ servers = await createMultipleServers(2)
// Get the access tokens
await setAccessTokensToServers(servers)
await commands[0].waitUntilSegmentGeneration({ videoUUID: liveVideoReplayId, resolution: 0, segment: 2 })
await killallServers([ servers[0] ])
- await reRunServer(servers[0])
+ await servers[0].run()
await wait(5000)
})