private writeToDisk () {
return this.writeQueue.add(async () => {
+ logger.debug(`Writing segment sha JSON ${this.sha256Path} of ${this.videoUUID} on disk %s.`, lTags(this.videoUUID))
+
// Atomic write: use rename instead of move that is not atomic
await writeJson(this.sha256PathTMP, mapToJSON(this.segmentsSha256))
await rename(this.sha256PathTMP, this.sha256Path)
await testUpdate({ ...base, type: undefined })
await testUpdate({ ...base, type: 'toto' as any })
})
-
- it('Should succeed with the correct params', async function () {
- await server.runnerJobs.update({
- jobUUID: liveAcceptedJob.uuid,
- jobToken: liveAcceptedJob.jobToken,
- payload: base,
- runnerToken
- })
-
- await server.runnerJobs.update({
- jobUUID: liveAcceptedJob.uuid,
- jobToken: liveAcceptedJob.jobToken,
- payload: { ...base, masterPlaylistFile: undefined },
- runnerToken
- })
- })
})
})
await servers[0].live.waitUntilPublished({ videoId: userVideoLiveoId })
+ const baseQuota = await servers[0].users.getMyQuotaUsed({ token: userAccessToken })
+
await wait(3000)
const quotaUser = await servers[0].users.getMyQuotaUsed({ token: userAccessToken })
const { data } = await servers[0].users.list()
const quotaAdmin = data.find(u => u.username === 'user1')
- expect(quotaUser.videoQuotaUsed).to.equal(quotaAdmin.videoQuotaUsed)
- expect(quotaUser.videoQuotaUsedDaily).to.equal(quotaAdmin.videoQuotaUsedDaily)
+ expect(quotaUser.videoQuotaUsed).to.be.above(baseQuota.videoQuotaUsed)
+ expect(quotaUser.videoQuotaUsedDaily).to.be.above(baseQuota.videoQuotaUsedDaily)
+
+ expect(quotaAdmin.videoQuotaUsed).to.be.above(baseQuota.videoQuotaUsed)
+ expect(quotaAdmin.videoQuotaUsedDaily).to.be.above(baseQuota.videoQuotaUsedDaily)
expect(quotaUser.videoQuotaUsed).to.be.above(10)
expect(quotaUser.videoQuotaUsedDaily).to.be.above(10)
+ expect(quotaAdmin.videoQuotaUsed).to.be.above(10)
+ expect(quotaAdmin.videoQuotaUsedDaily).to.be.above(10)
await stopFfmpeg(ffmpegCommand)
})