aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/redundancy
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-07 11:07:12 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commitbc8090411ddaa8d742ce4de3c83f9dba7bc18e2a (patch)
tree5020b384b6bc4870b06c53a0483abf551b33604e /server/tests/api/redundancy
parentdab047092b51b453f175069573d8865fb17acdfc (diff)
downloadPeerTube-bc8090411ddaa8d742ce4de3c83f9dba7bc18e2a.tar.gz
PeerTube-bc8090411ddaa8d742ce4de3c83f9dba7bc18e2a.tar.zst
PeerTube-bc8090411ddaa8d742ce4de3c83f9dba7bc18e2a.zip
Introduce stats command
Diffstat (limited to 'server/tests/api/redundancy')
-rw-r--r--server/tests/api/redundancy/redundancy.ts15
1 files changed, 2 insertions, 13 deletions
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts
index 5b970473c..e4ea99de6 100644
--- a/server/tests/api/redundancy/redundancy.ts
+++ b/server/tests/api/redundancy/redundancy.ts
@@ -5,7 +5,6 @@ import * as chai from 'chai'
5import { readdir } from 'fs-extra' 5import { readdir } from 'fs-extra'
6import * as magnetUtil from 'magnet-uri' 6import * as magnetUtil from 'magnet-uri'
7import { join } from 'path' 7import { join } from 'path'
8import { removeVideoRedundancy } from '@server/lib/redundancy'
9import { HttpStatusCode } from '@shared/core-utils' 8import { HttpStatusCode } from '@shared/core-utils'
10import { 9import {
11 checkSegmentHash, 10 checkSegmentHash,
@@ -30,15 +29,7 @@ import {
30 waitJobs, 29 waitJobs,
31 waitUntilLog 30 waitUntilLog
32} from '@shared/extra-utils' 31} from '@shared/extra-utils'
33import { getStats } from '@shared/extra-utils/server/stats' 32import { VideoDetails, VideoPrivacy, VideoRedundancyStrategy, VideoRedundancyStrategyWithManual } from '@shared/models'
34import {
35 ServerStats,
36 VideoDetails,
37 VideoPrivacy,
38 VideoRedundancy,
39 VideoRedundancyStrategy,
40 VideoRedundancyStrategyWithManual
41} from '@shared/models'
42 33
43const expect = chai.expect 34const expect = chai.expect
44 35
@@ -241,9 +232,7 @@ async function checkStatsGlobal (strategy: VideoRedundancyStrategyWithManual) {
241 statsLength = 2 232 statsLength = 2
242 } 233 }
243 234
244 const res = await getStats(servers[0].url) 235 const data = await servers[0].statsCommand.get()
245 const data: ServerStats = res.body
246
247 expect(data.videosRedundancy).to.have.lengthOf(statsLength) 236 expect(data.videosRedundancy).to.have.lengthOf(statsLength)
248 237
249 const stat = data.videosRedundancy[0] 238 const stat = data.videosRedundancy[0]