aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/live
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-22 14:31:35 +0200
committerChocobozzz <me@florianbigard.com>2023-05-22 15:03:14 +0200
commit6a9b3151822461a85bbc72b7a50e12ffb69bec3a (patch)
tree1685c31114707d90144100319aead6c63aef6254 /server/tests/api/live
parent8762b1c7ffbb82e817bb07b381503997b5aca50d (diff)
downloadPeerTube-6a9b3151822461a85bbc72b7a50e12ffb69bec3a.tar.gz
PeerTube-6a9b3151822461a85bbc72b7a50e12ffb69bec3a.tar.zst
PeerTube-6a9b3151822461a85bbc72b7a50e12ffb69bec3a.zip
Fix tests
Diffstat (limited to 'server/tests/api/live')
-rw-r--r--server/tests/api/live/live-constraints.ts11
1 files changed, 9 insertions, 2 deletions
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 () {
173 173
174 await servers[0].live.waitUntilPublished({ videoId: userVideoLiveoId }) 174 await servers[0].live.waitUntilPublished({ videoId: userVideoLiveoId })
175 175
176 const baseQuota = await servers[0].users.getMyQuotaUsed({ token: userAccessToken })
177
176 await wait(3000) 178 await wait(3000)
177 179
178 const quotaUser = await servers[0].users.getMyQuotaUsed({ token: userAccessToken }) 180 const quotaUser = await servers[0].users.getMyQuotaUsed({ token: userAccessToken })
@@ -180,11 +182,16 @@ describe('Test live constraints', function () {
180 const { data } = await servers[0].users.list() 182 const { data } = await servers[0].users.list()
181 const quotaAdmin = data.find(u => u.username === 'user1') 183 const quotaAdmin = data.find(u => u.username === 'user1')
182 184
183 expect(quotaUser.videoQuotaUsed).to.equal(quotaAdmin.videoQuotaUsed) 185 expect(quotaUser.videoQuotaUsed).to.be.above(baseQuota.videoQuotaUsed)
184 expect(quotaUser.videoQuotaUsedDaily).to.equal(quotaAdmin.videoQuotaUsedDaily) 186 expect(quotaUser.videoQuotaUsedDaily).to.be.above(baseQuota.videoQuotaUsedDaily)
187
188 expect(quotaAdmin.videoQuotaUsed).to.be.above(baseQuota.videoQuotaUsed)
189 expect(quotaAdmin.videoQuotaUsedDaily).to.be.above(baseQuota.videoQuotaUsedDaily)
185 190
186 expect(quotaUser.videoQuotaUsed).to.be.above(10) 191 expect(quotaUser.videoQuotaUsed).to.be.above(10)
187 expect(quotaUser.videoQuotaUsedDaily).to.be.above(10) 192 expect(quotaUser.videoQuotaUsedDaily).to.be.above(10)
193 expect(quotaAdmin.videoQuotaUsed).to.be.above(10)
194 expect(quotaAdmin.videoQuotaUsedDaily).to.be.above(10)
188 195
189 await stopFfmpeg(ffmpegCommand) 196 await stopFfmpeg(ffmpegCommand)
190 }) 197 })