X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=server%2Ftests%2Fapi%2Flive%2Flive-constraints.ts;fp=server%2Ftests%2Fapi%2Flive%2Flive-constraints.ts;h=168241b797b87d20c586ec38a623eb0694c01ce4;hb=6a9b3151822461a85bbc72b7a50e12ffb69bec3a;hp=37fd5b2a639c15bd0806f9af8762ffc650d9782d;hpb=8762b1c7ffbb82e817bb07b381503997b5aca50d;p=github%2FChocobozzz%2FPeerTube.git 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) })