/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
-import 'mocha'
-import * as chai from 'chai'
+import { expect } from 'chai'
+import { checkLiveCleanup } from '@server/tests/shared'
import { wait } from '@shared/core-utils'
import { LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models'
import {
waitJobs
} from '@shared/server-commands'
-const expect = chai.expect
-
describe('Permanent live', function () {
let servers: PeerTubeServer[] = []
let videoUUID: string
})
it('Should stream into this permanent live', async function () {
- this.timeout(120000)
+ this.timeout(240_000)
const beforePublication = new Date()
const ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: videoUUID })
expect(videoDetails.streamingPlaylists).to.have.lengthOf(0)
}
+
+ await checkLiveCleanup({ server: servers[0], permanent: true, videoUUID })
})
it('Should have set this live to waiting for live state', async function () {
}
})
+ it('Should remove the live and have cleaned up the directory', async function () {
+ this.timeout(60000)
+
+ await servers[0].videos.remove({ id: videoUUID })
+ await waitJobs(servers)
+
+ await checkLiveCleanup({ server: servers[0], permanent: true, videoUUID })
+ })
+
after(async function () {
await cleanupTests(servers)
})