import {
cleanupTests,
ConfigCommand,
+ createMultipleServers,
doubleFollow,
- flushAndRunMultipleServers,
- ServerInfo,
+ PeerTubeServer,
setAccessTokensToServers,
setDefaultVideoChannel,
stopFfmpeg,
const expect = chai.expect
describe('Permanent live', function () {
- let servers: ServerInfo[] = []
+ let servers: PeerTubeServer[] = []
let videoUUID: string
async function createLiveWrapper (permanentLive: boolean) {
before(async function () {
this.timeout(120000)
- servers = await flushAndRunMultipleServers(2)
+ servers = await createMultipleServers(2)
// Get the access tokens
await setAccessTokensToServers(servers)
it('Should stream into this permanent live', async function () {
this.timeout(120000)
+ const beforePublication = new Date()
const ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: videoUUID })
for (const server of servers) {
await checkVideoState(videoUUID, VideoState.PUBLISHED)
+ for (const server of servers) {
+ const video = await server.videos.get({ id: videoUUID })
+ expect(new Date(video.publishedAt)).greaterThan(beforePublication)
+ }
+
await stopFfmpeg(ffmpegCommand)
await servers[0].live.waitUntilWaiting({ videoId: videoUUID })