From 6a9b3151822461a85bbc72b7a50e12ffb69bec3a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 22 May 2023 14:31:35 +0200 Subject: Fix tests --- server/tests/api/check-params/runners.ts | 16 ---------------- server/tests/api/live/live-constraints.ts | 11 +++++++++-- 2 files changed, 9 insertions(+), 18 deletions(-) (limited to 'server/tests') diff --git a/server/tests/api/check-params/runners.ts b/server/tests/api/check-params/runners.ts index cee1993e6..48821b678 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.ts index 37fd5b2a6..168241b79 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) }) -- cgit v1.2.3