+ it('Should have cleaned up the live files', async function () {
+ await checkLiveCleanup({ server: servers[0], videoUUID: liveVideoUUID, permanent: false })
+ })
+
+ it('Should correctly terminate the stream on blacklist and blacklist the saved replay video', async function () {
+ this.timeout(120000)
+
+ await servers[0].videos.remove({ id: lastReplayUUID })
+ const { liveDetails } = await publishLiveAndBlacklist({
+ permanent: true,
+ replay: true,
+ replaySettings: { privacy: VideoPrivacy.PUBLIC }
+ })
+
+ const replay = await findExternalSavedVideo(servers[0], liveDetails)
+ expect(replay).to.exist
+
+ for (const videoId of [ liveVideoUUID, replay.uuid ]) {
+ await checkVideosExist(videoId, false)
+
+ await servers[0].videos.get({ id: videoId, expectedStatus: HttpStatusCode.UNAUTHORIZED_401 })
+ await servers[1].videos.get({ id: videoId, expectedStatus: HttpStatusCode.NOT_FOUND_404 })
+ }
+
+ await checkLiveCleanup({ server: servers[0], videoUUID: liveVideoUUID, permanent: false })
+ })
+
+ it('Should correctly terminate the stream on delete and not save the video', async function () {
+ this.timeout(40000)
+
+ const { liveDetails } = await publishLiveAndDelete({
+ permanent: true,
+ replay: true,
+ replaySettings: { privacy: VideoPrivacy.PUBLIC }
+ })
+
+ const replay = await findExternalSavedVideo(servers[0], liveDetails)
+ expect(replay).to.not.exist
+
+ await checkVideosExist(liveVideoUUID, false, HttpStatusCode.NOT_FOUND_404)
+ await checkLiveCleanup({ server: servers[0], videoUUID: liveVideoUUID, permanent: false })
+ })