ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix tests
Chocobozzz6a9b31518224
diff --git a/server/lib/live/live-segment-sha-store.ts b/server/lib/live/live-segment-sha-store.tsindex 1a0a939855..08fc460b8b 100644--- a/server/lib/live/live-segment-sha-store.ts+++ b/server/lib/live/live-segment-sha-store.ts@@ -72,6 +72,8 @@ class LiveSegmentShaStore {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 atomicawait writeJson(this.sha256PathTMP, mapToJSON(this.segmentsSha256))await rename(this.sha256PathTMP, this.sha256Path)diff --git a/server/tests/api/check-params/runners.ts b/server/tests/api/check-params/runners.tsindex cee1993e60..48821b6783 100644--- a/server/tests/api/check-params/runners.ts+++ b/server/tests/api/check-params/runners.ts@@ -674,22 +674,6 @@ describe('Test managing runners', function () {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- })- })})})diff --git a/server/tests/api/live/live-constraints.ts b/server/tests/api/live/live-constraints.tsindex 37fd5b2a63..168241b797 100644--- a/server/tests/api/live/live-constraints.ts+++ b/server/tests/api/live/live-constraints.ts@@ -173,6 +173,8 @@ describe('Test live constraints', function () {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 })@@ -180,11 +182,16 @@ describe('Test live constraints', function () {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)})